我正在试验木偶,我们在一些服务器上使用FreeBSD。 我注意到在FreeBSD上的代理是由于某种原因跳过运行,即:
May 6 09:19:15 eagle puppet-agent[66970]: Finished catalog run in 1.97 seconds May 6 09:49:14 eagle puppet-agent[74306]: Finished catalog run in 1.72 seconds May 6 10:19:29 eagle puppet-agent[80895]: Finished catalog run in 2.19 seconds May 6 10:49:29 eagle puppet-agent[87436]: Finished catalog run in 2.37 seconds May 6 12:19:26 eagle puppet-agent[7879]: Finished catalog run in 2.51 seconds May 6 12:49:26 eagle puppet-agent[14528]: Finished catalog run in 2.64 seconds
正如你所看到的,它跳过了两次(11:19和11:49)。 不幸的是,日志中没有更多的木偶行。 我检查了木偶代理程序,并且一直在运行。
Puppet是v3.1.1,由ports构build,FreeBSD是8.3-STABLE,我使用了-distconfiguration,而且我只改变了一些选项,最重要的是
runinterval = 30m
主机在KVM虚拟化环境下运行,所以有一点时间的变化:
May 6 10:20:28 eagle ntpd[656]: time reset -0.296053 s May 6 11:19:03 eagle ntpd[656]: time reset -0.333463 s May 6 12:21:38 eagle ntpd[656]: time reset -0.328728 s
正如你所看到的,在傀儡运行的时候,cca有0.33秒的移动,但是我不确定这是否重要。 它不到一秒钟,它向后移动,在运行之前还有几秒钟的时间。
我知道我可以从cron运行puppet运行,但我想使用守护进程模式,因为我打算使用REST API。
有没有办法如何debugging“时间触发”机制?
由于我无法find原因,我用明显的解决方法“解决”了问题。 我在puppet.conf中有一个非常长的(1000天)运行间隔,我通过REST API从cron运行puppet周期。