mcollective to manage puppet agents on masterless puppet setup

634 Views Asked by At

Using puppet version 3.4.3

Have setup mcollective and puppet.

For the puppet setup, I am running puppet apply as below in a 10 minute cron (as described in puppet 3 cookbook):

 PUPPETDIR=/home/ec2-user/puppet
/usr/bin/puppet apply --modulepath ${PUPPETDIR}/modules ${PUPPETDIR}/manifests/site.pp

As far as mcollective goes, I can successfully get the o/p from the below two commands (bold):

# mco puppet summary
Summary statistics for 1 nodes:

                  Total resources: ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 24.0   max: 24.0 
            Out Of Sync resources: ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 3.0    max: 3.0  
                 Failed resources: ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 0.0    max: 0.0  
                Changed resources: ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 3.0    max: 3.0  
  Config Retrieval time (seconds): ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 1.4    max: 1.4  
         Total run-time (seconds): ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 3.2    max: 3.2  
    Time since last run (seconds): ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  min: 1.8k   max: 1.8k 

# puppet --version
3.4.3

# mco rpc puppet last_run_summary
Discovering hosts using the mc method for 2 second(s) .... 1

 * [ ============================================================> ] 1 / 1


awo-p03-adm01                           
       Changed Resources: 3
   Config Retrieval Time: 1.376637
          Config Version: 1398141604
        Failed Resources: 0
                Last Run: 1398141611
           Last Run Logs: {}
   Out of Sync Resources: 3
          Since Last Run: 2208
                 Summary: {"resources"=>

However, when I use the command, 'puppet runonce' I am unable to get the puppet apply to run as expected.

Can someone kindly guide me with accurately setting up mcollective to manage masterless puppet?

1

There are 1 best solutions below

0
On

Assuming you are using the official puppet agent, mco puppet runonce will trigger an agent run, i.e. puppet agent --onetime. To trigger a puppet apply, you will need to use a different mco agent or make preparations of your own.