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

2 views
Skip to first unread message

Daniel Steininger (JIRA)

unread,
Sep 5, 2019, 6:30:03 AM9/5/19
to puppe...@googlegroups.com
Daniel Steininger created an issue
 
Puppet / Bug PUP-9998
Puppet agent --disable is ignored with cron puppet agent (splay).
Issue Type: Bug Bug
Affects Versions: PUP 4.10.12
Assignee: Henrik Lindberg
Components: Functions
Created: 2019/09/05 3:29 AM
Priority: Normal Normal
Reporter: Daniel Steininger

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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Daniel Steininger (JIRA)

unread,
Sep 5, 2019, 6:34:02 AM9/5/19
to puppe...@googlegroups.com
Daniel Steininger commented on Bug PUP-9998
 
Re: Puppet agent --disable is ignored with cron puppet agent (splay).

A better behaviour would be if puppet agent would check the lock file again after the sleep.

Josh Cooper (JIRA)

unread,
Sep 5, 2019, 12:54:03 PM9/5/19
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Unassigned
 
Change By: Josh Cooper
Assignee: Henrik Lindberg

Josh Cooper (JIRA)

unread,
Sep 5, 2019, 12:55:04 PM9/5/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9998
 
Re: Puppet agent --disable is ignored with cron puppet agent (splay).

This is due to the way the daemon code interacts with puppet's scheduler. It should attempt to acquire the lock in the job that runs the agent (after splay has been applied).

Josh Cooper (JIRA)

unread,
Sep 5, 2019, 4:13:02 PM9/5/19
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 13, 2020, 1:22:04 AM3/13/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity Night's Watch
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 3:51:04 AM11/5/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 3:52:04 AM11/5/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 3, 2021, 2:02:03 PM5/3/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-7532
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Nov 17, 2021, 7:23:02 AM11/17/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Nov 17, 2021, 7:23:03 AM11/17/21
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Mar 25, 2022, 1:30:02 PM3/25/22
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 47856
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Austin Boyd (Jira)

unread,
Mar 25, 2022, 1:30:02 PM3/25/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 28, 2022, 11:44:01 AM4/28/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 28, 2022, 12:31:02 PM4/28/22
to puppe...@googlegroups.com

Lisa Ross (Jira)

unread,
May 5, 2022, 9:43:01 AM5/5/22
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
May 5, 2022, 11:12:01 AM5/5/22
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Acceptance Criteria: Agent with splay checks if its disabled after sleep
Story Points: 2

Michael Hashizume (Jira)

unread,
May 5, 2022, 11:13:02 AM5/5/22
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Acceptance Criteria: Agent with splay checks if its disabled after sleep , skips run.

Michael Hashizume (Jira)

unread,
May 5, 2022, 11:14:03 AM5/5/22
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
May 5, 2022, 11:15:02 AM5/5/22
to puppe...@googlegroups.com

Tony Vu (Jira)

unread,
May 11, 2022, 11:55:01 AM5/11/22
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Sprint: Phoenix 2022- 05 06 - 25 08

Aria Li (Jira)

unread,
May 18, 2022, 2:31:01 PM5/18/22
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Fix Version/s: PUP 7.17.0

Michael Hashizume (Jira)

unread,
May 18, 2022, 2:31:02 PM5/18/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 6, 2022, 12:06:03 PM6/6/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Jun 8, 2022, 11:13:02 AM6/8/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Sprint: Phoenix 2022-06-08 , Phoenix 2022-06-22

Parker Leach (Jira)

unread,
Jul 20, 2022, 12:04:03 PM7/20/22
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed jira_escalated
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages