I’m running Foreman 1.18 with Puppet Server 5.3.3 on CentOS 7.5. I had originally installed Foreman 1.17 with the Foreman installer, using pretty much all default settings, and have since upgraded to 1.18. Foreman and Puppet Server are running on the same server. I’m using the Puppet agent service which runs at the default 30 minute intervals. There are only two managed hosts right now, the Puppet Server itself, and a single desktop system. Reports for both hosts are appearing on Foreman’s dashboard at 30 minute intervals, with no events to show because their configs are correct. The only log entry for each is the “Applied catalog” notice. Foreman’s out of sync interval setting is 5 min. Both hosts have the correct time.
Both hosts are running the Puppet agent at around the same time, and they’ll show as OK in the dashboard for a few minutes afterwards. But around 6 minutes after they’ve run, the host statuses change to out of sync. It seems to me like the out of sync interval is not getting added to the Puppet interval as expected. Any tips on how to troubleshoot this further, or does it sound like it’s worthy of a bug report? Or do I not correctly understand how this is supposed to work?
Ah, good to know. But that bug report’s title (“Default out of sync interval is 5 minutes”) and the content of the pull requests lead me to believe that the out of sync interval is not supposed to get added to the puppet interval, as stated in the documentation. So which is correct?
Is it necessary for the out of sync interval to be greater than the puppet interval? Or is it okay for it to be smaller because when working correctly Foreman will add the values together?
The 1.18 documentation says:
outofsync_interval
Duration in minutes after the Puppet interval for servers to be classed as out of sync. This is added to the puppet_interval setting and used in pages such as the host list and dashboard. Default: 5
It’s hard to keep docs in sync with code
but in this case @bastilian know he needs to correct the manual accordingly.
Alright. So the correct fix is to make sure the out of sync interval is larger than the puppet interval. Thanks for the quick responses!
I think after the change, you should set puppet interval to 35.
The out of sync used to be added to puppet interval, but after more intervals for other cfgmgmt systems were introduced, it changed its meaning. This is used as out of sync interval for hosts, for which we don’t know report origin. It’s no longer added to puppet interval or any other cfgmgmt intervals. This patch aims to restore the original behavior - https://github.com/theforeman/foreman/pull/5870#pullrequestreview-143479996 by setting the puppet interval to 35 (default puppet interval + original out of sync). So you can either wait until it gets to your version or update the puppet interval to 35 manually.
Hope that helps
As @Marek_Hulan pointed out the interval values have changed meaning and are now not added and the “outofsync_interval” value is now for reports that can not be identified. I’ve opened a PR[1] to reflect that better.
I’d appreciate feedback if that clarifies their purposes.
[1] https://github.com/theforeman/theforeman.org/pull/1172
That does clarify their meanings, and I appreciate the response since it changes what I stated was the correct fix in my earlier post. I’ve now set the outofsync_interval to 30 and the puppet_interval to 35, which seems to work as described.
I’m not sure if the changes in your pull request, or in the one posted earlier in this thread will also update the description field on Foreman’s Administer/Settings page, but that needs to reflect the new meanings as well.