Foreman displays a server as “out of sync”, what could be the reason and what is the right way to troubleshoot such an issue

foremanpuppetpuppetmaster

There's a puppet server in the company I work for with Foreman installed.

There are around 200 Linux machines which are being managed by the Puppet server.

When looking in the Foreman GUI, most server appear with a green icon saying "No changes" but there are some servers which appear with a yellow/orange icon with a tooltip saying "out of sync".

You can see in the following screen shot that most servers appear with green status and only server "sgproxy08" is out of sync:
enter image description here

Running puppet agent -t on the sgproxy08 server finishes properly:

[root@sgproxy08 ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for sgproxy08.sg.company.com
Info: Applying configuration version '1436862601'
Notice: Finished catalog run in 49.90 seconds
[root@sgproxy08 ~]#

Now there are two questions:

  1. What are the requirements for this icon to become green and in sync?
  2. How can I troubleshoot such an issue?

Best Answer

If you're on Foreman 1.8 or lower, your host will be shown as 'out of sync' only when Foreman has not received any reports for that host for 5 minutes longer than the setting 'puppet_interval' (check it in Administer > Settings). By default this would be 35 minutes. There's an 'outofsync_interval' setting that allows you to customize this on Foreman 1.9.

In order to start troubleshooting this (missing reports), I would look at /var/log/foreman/production.log on your Foreman boxes and check if you receive the report from that host when Puppet finishes its run.

Related Topic