Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9998

Puppet agent --disable is ignored with cron puppet agent (splay).

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.10.12
    • Fix Version/s: None
    • Component/s: Functions
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Team:
      Night's Watch
    • Sprint:
      ready for triage
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      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
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dsteininger Daniel Steininger
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support