Puppet Version: v4.10.12 OS Name/Version: Debian GNU/Linux 8 (jessie) Desired Behavior: All puppet runs should not start until the lock file is available. Actual Behavior: It seems that the puppet agent command checks if the lock file exists in the early state. If not, the splay sleep starts. Then the puppet run itself starts. When I call "puppet agent - disabled" after Cron based puppet is started. The lock file has no effect on the puppet run, which starts after the sleep phase. Test scenario 2019-09-05 07:48:46 /opt/puppetlabs/bin/puppet agent --config /etc/puppetlabs/puppet/puppet.conf --onetime --no-daemonize --logdest /var/log/puppetlabs/puppet/puppet.log .... starts and is in sleep mode ... 2019-09-05 07:49:25 puppet agent --disable (other shell) ... ... 20 minutes later: .... ... sleep over -> Puppet is on going: .... ... Puppet is done 2019-09-05 08:18:33 echo $? 0 Lock file is still present: The second run stops correctly.
root@server:/etc/puppetlabs/puppet# /opt/puppetlabs/bin/puppet agent --config /etc/puppetlabs/puppet/puppet.conf --onetime --no-daemonize --logdest /var/log/puppetlabs/puppet/puppet.log |
root@server:/etc/puppetlabs/puppet# echo $? |
1
|
Settings puppet.conf
root@server:~# cat /etc/puppetlabs/puppet/puppet.conf | grep splay |
splay = true |
splaylimit = 1800
|
crontab -e
# Puppet Name: puppet |
17,47 * * * * /opt/puppetlabs/bin/puppet agent --config /etc/puppetlabs/puppet/puppet.conf --onetime --no-daemonize --logdest /var/log/puppetlabs/puppet/puppet.log
|
|