0

Linux servers in my company are configured and managed by Puppet which installed with Foreman.

While looking at the Foreman dashboard I can see that 95% of the servers appear as synced and updated (blue icon) and 20 servers which have no known common ground appear as unsynced and not updated.

When looking on the /etc/puppet/puppet.conf file on any of the Puppet agents (the ones which are updated or the ones that are not updated), I see it's configured like so:

[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl

[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuratiion.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$confdir/classes.txt'.
    classfile = $vardir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig

Which is the default configuration which came with the package.

You can see that under the [agent] section the only configured directives are classfile and localconfig while on the Puppet server's /etc/puppet/puppet.conf the '[agent]' section looks like so:

[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuratiion.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$statedir/classes.txt'.
    classfile = $vardir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig

    # Disable the default schedules as they cause continual skipped
    # resources to be displayed in Foreman - only for Puppet >= 3.4
    default_schedules = false

    report        = true
    pluginsync    = true
    masterport    = 8140
    environment   = production
    certname      = puppet.nj.company.com
    server        = puppet.nj.company.com
    listen        = false
    splay         = false
    runinterval   = 1800
    noop          = false
    configtimeout = 120

So my questions are:

  1. Shall I copy what's under agent section in the Puppet server to the clients?
  2. What could cause the specific servers not to be updated by the Puppet server if they are all configured automatically by Puppet and they're all configured in the same way?
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
  • The agents (both afflicted and not so) should be logging to syslog. Are those entries inconclusive? Are they missing? – Felix Frank Sep 07 '15 at 13:10
  • They are not missing if I manually run "puppet agent -t" otherwise they are missing because the agent doesn't pull configuration – Itai Ganot Sep 07 '15 at 13:31

1 Answers1

1

Most of the settings under [agent] on your server are the defaults and you don't need to copy them to your clients. The only one that really matters is server if the default of puppet (relying on the search domain) isn't sufficient. Since you say running Puppet manually works, I guess you don't even have to worry about that.

It simply sounds like your clients aren't running the Puppet agent service. Start it and ensure it's configured to start at boot.

Puppet uses a pull model, so you need to run the agent to pull configuration from the master, every 30 mins by default when the agent is running as a service. Normally you'd configure the agent to start at boot during provisioning.

e.g. run service puppet start or systemctl start puppet (systemd) and if you're on a Red Hat-type OS, also run systemctl enable puppet (systemd) or chkconfig puppet on.

Dominic Cleal
  • 3,160
  • 19
  • 16
  • The service is turned on in chkconfig on all servers and it's also running on all servers. – Itai Ganot Sep 08 '15 at 13:19
  • So to clear up your reply earlier about logs - do you have any logs from the services, or is it *only* when you run it interactively? If the latter, it really sounds like they're not running - try restarting the service and monitor syslog. – Dominic Cleal Sep 08 '15 at 14:46