The Puppet Labs Issue Tracker has Moved:


NOTE: This agent has been superceded by the new Puppet Agent


Simple agent to enable, disable or kick off a runonce of your puppet client daemons.

Note: There are design issues with how Puppet handles locking which means doing disable/enable while a Puppetd is busy doesn’t work reliably. Several bugs have been filed against Puppet about these issues see #2888, #3757, #5139, #5246 and #5153

You can now run the normal puppet daemon as well as cause runs via MCollective. This agent will send a HUP signal if it detects that the puppet daemon is running. This version of the agent will incorrectly report a puppet agent as Idling when it’s in fact stopped. This is due to a Puppet bug that has been fixed in releases 2.7.10 and 2.6.14.



You can specify some paths, splay time etc in the mcollective server.cfg here’s a sample, by default it uses paths correct for RedHat systems

plugin.puppetd.puppetd = /usr/sbin/puppetd
plugin.puppetd.lockfile = /var/lib/puppet/state/puppetdlock
plugin.puppetd.statefile = /var/lib/puppet/state/state.yaml
plugin.puppet.pidfile = /var/run/puppet/
plugin.puppetd.splaytime = 100
plugin.puppet.summary = /var/lib/puppet/state/last_run_summary.yaml

Most settings are obvious, if you set splaytime your puppetd will run with —splaylimit x —splay by default but you can still on demand insist on immediate runs, by default it will splay.


General Usage

The included mco puppetd application is a wrapper around the common usage:

% mco puppetd -W /dev_server/ status

 * [ ============================================================> ] 2 / 2                      Enabled, not running, last run 805 seconds ago                      Enabled, not running, last run 3281 seconds ago

You can also use these instead of status: runonce, enable, disable, count and runall

Forcing runs

% mco puppetd -W customer=rip runonce

 * [ ============================================================> ] 2 / 2

Finished processing 2 / 2 hosts in 1614.84 ms

This will do a run based on your splay setting, if you wanted to force an immediate run supply -f

Running all nodes

In the event that you want to run all your nodes as quick as possible you can use the mc-puppetd script to do this and enforce a maximum concurrency for these runs:

% mco puppetd -W /dev_server/ runall 2
Thu Aug 05 17:47:21 +0100 2010> Running all machines with a concurrency of 2
Thu Aug 05 17:47:21 +0100 2010> Discovering hosts to run
Thu Aug 05 17:47:23 +0100 2010> Found 4 hosts
Thu Aug 05 17:47:24 +0100 2010> Running, concurrency is 0
Thu Aug 05 17:47:26 +0100 2010> schedule status: OK
Thu Aug 05 17:47:28 +0100 2010> Running, concurrency is 1
Thu Aug 05 17:47:30 +0100 2010> schedule status: OK
Thu Aug 05 17:47:32 +0100 2010> Running, concurrency is 2
Thu Aug 05 17:47:34 +0100 2010> schedule status: OK
Thu Aug 05 17:47:35 +0100 2010> Currently 3 nodes running, waiting
Thu Aug 05 17:48:00 +0100 2010> Running, concurrency is 2
Thu Aug 05 17:48:05 +0100 2010> schedule status: OK

Here we’re running all our machines with the class /dev_server/ but never more than 2 at a time.


This plugin is a normal SimpleRPC plugin you can interact with it using the normal mc-rpc as below:

% mco rpc puppetd status
Determining the amount of hosts matching filter for 2 seconds .... 2

 * [ ============================================================> ] 2 / 2                      
    Running: 0
    Enabled: 1
   Last Run: 1291118239
     Status: Enabled, not running, last run 592 seconds ago                      
    Enabled: 1
    Running: 0
     Status: Enabled, not running, last run 3068 seconds ago
   Last Run: 1291115763

Finished processing 2 / 2 hosts in 148.11 ms

As of version 2.6.8 of Puppet a structured summary report of each run gets reported, if you have this version of puppet you can look at these summaries as below:

% mco puppetd summary -I

 * [ ============================================================> ] 1 / 1
        {"failed"=>0, "changed"=>0, "total"=>564, "restarted"=>0, "out_of_sync"=>0}

Finished processing 1 / 1 hosts in 39.24 ms

This would typically be used to write a monitoring system rather than interactive use like this.