Puppet

Puppet Server 未應用清單

  • June 21, 2016

我使用四個節點進行了 Puppet/MCollective 設置。

 # mco ping
 Node-010.test.com                   time=107.58 ms
 Node-003.test.com                   time=110.68 ms
 Node-009.test.com                   time=114.42 ms
 Node-002.test.com                   time=116.49 ms

#mco puppet runonce 工作正常,但沒有應用清單。

 # mco puppet runonce
 * [ ============================================================> ] 4 / 4
 Finished processing 4 / 4 hosts in 151.61 ms

我的清單配置如下:

  # puppet master --configprint manifest
  /etc/puppetlabs/code/environments/production/manifests

我的 Site.pp 如下

 # cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node default {
}
node 'Node-002.test.com'{
file {"/tmp/helloworld.txt":
     ensure => file,
     owner  => 'root',
     group  => 'root',
     mode   => '0644',
     content =>" Hi ",
  }
 }

Site.pp 沒有得到應用。

從日誌文件看,它似乎正在從記憶體中讀取併申請不存在規則的節點。

 ` # tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
2016-06-21 20:21:06,355 INFO  [qtp1367105977-65] [puppet-server] Puppet    Compiled catalog for Node-009.test.com in environment qa in 0.04 seconds
2016-06-21 20:21:08,223 INFO  [qtp1367105977-65] [puppet-server] Puppet Caching node for Node-002.test.com
2016-06-21 20:21:08,618 INFO  [qtp1367105977-69] [puppet-server] Puppet Caching node for Node-002.test.com 

我是否遇到了一些錯誤或缺少一些配置項?

根據評論:代理要求環境qa,而您顯示site.pp環境production。因此,最好仔細檢查雙方的環境,master 和 agent。:)

引用自:https://serverfault.com/questions/785257