mcollective在无主木偶设置上管理木偶代理

时间:2014-04-22 05:47:52

标签: puppet mcollective

使用puppet 3.4.3版

设置mcollective和puppet。

对于木偶设置,我正在运行木偶申请如下10分钟cron(如傀儡3食谱中所述):

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

就mcollective而言,我可以从以下两个命令(粗体)成功获得o / p:

# 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"=>

然而,当我使用命令时,' puppet runonce'我无法让木偶申请按预期运行。

有人可以指导我准确地设置mcollective来管理无主傀儡吗?

1 个答案:

答案 0 :(得分:1)

假设您使用official puppet agentmco puppet runonce将触发代理运行,即puppet agent --onetime。要触发puppet apply,您需要使用其他mco agent或自己做好准备。