Problem:
When a agent synchronising with a new configuration, we can’t see the show-diff fonctions in reports host. Expected outcome:
We need to be able to click on the show_diff menu in the reporting to compare the synchronizations Foreman and Proxy versions:
2.3.5 Foreman and Proxy plugin versions:
Distribution and version:
Ubuntu 18.04 Other relevant data:
Well, this is a puppet problem. It’s difficult to tell without knowing how you run the agent exactly. You also don’t mention which puppet version you are using. You have to check the puppet documentation for your puppet version to find the default value.
To enable/disable show_diff fonction, the agent need to be restarted.
The documentation about show_diff fonction is really thin, by default the show_diff fonction is enabled because i never set the options, but on my production env, this fonction does not work anymore. There is no difference between prod and preprod
No. Not with puppet 6. The agent reads the current configuration for each run. You still don’t mention which puppet version you are actually using, so everything remains guess work. I don’t think puppet 5 should be different.
No. According to the puppet docs (and my experience) show_diff is false by default. If it delivers diffs, there must be something setting it.
But again, it kind of depends on how the agent is called exactly. If you running the agent as standard daemon service without overriding settings on the command line you should be able to check the settings with puppet config:
I would suggest you double check how the agent is run on your system, i.e. which daemon is actually running and what command line options is uses. Depending on your init or systemd service file there are several files available to add options for the daemon which overwrite the settings in the configuration files.
/opt/puppetlabs/bin/puppet is the puppetlab version, but there is also a puppet version available from ubuntu. Maybe you mix them? They probably use different paths at different locations for configuration files…
And I can only repeat again: everything is kind of guesswork unless you reveal which version you have installed…
So you are manually enabling show_diff. If you use --test you’ll see diffs regardless of your settings in configuration files because command line settings take precedence.
So check the service and the settings. Use systemctl status puppet to see the service is really used and running and in which files the service unit (and possible additions) are. The puppet.service I have reads serveral environment files allowing to set additional options on command line to the agent service…
--test: Enable the most common options used for testing. These are
´onetime´, ´verbose´, ´no-daemonize´, ´no-usecacheonfailure´,
´detailed-exitcodes´, ´no-splay´, and ´show_diff´.
That looks suspect: the service is disabled. Why is it running? It won’t run after a reboot if it’s disabled.
Look into /lib/systemd/system/puppet.service to see which environment files are loaded and check if anything is in there…
You also don’t tell the path of your puppet.conf file you are using…