Jira (PUP-8899) New setting to allow external control over start of puppet run

1 view
Skip to first unread message

Matthias Hörmann (JIRA)

unread,
May 30, 2018, 5:52:02 AM5/30/18
to puppe...@googlegroups.com
Matthias Hörmann created an issue
 
Puppet / New Feature PUP-8899
New setting to allow external control over start of puppet run
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2018/05/30 2:51 AM
Priority: Normal Normal
Reporter: Matthias Hörmann

5.5.1 on Linux

We have a host system with many containers, all managed by Puppet. When the hosts boots or all containers need to be restarted for some reason, all Puppet agents start at the same time. We do not want to use splay since that would affect Puppet restarts we perform manually after changing configuration.

It would be useful if Puppet had some sort of setting, similar to pre_run_command and post_run_command to allow an external script to decide whether a Puppet run should start now. I imagine this to work as a polling mechanism, where Puppet polls an external script repeatedly for permission to run now after its own runinterval has expired.

I do not want to implement this via pre_run_command since i do not think this is designed for arbitrary wait intervals.

This could solve our problem by allowing us to implement our own worker pool logic in e.g. a shared directory, where a Puppet agent needs to lock one of a limited number of slots before it can start its run. We could then free that slot again in post_run_command.

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

Jacob Helwig (JIRA)

unread,
Jun 11, 2018, 5:20:03 PM6/11/18
to puppe...@googlegroups.com
Jacob Helwig commented on New Feature PUP-8899
 
Re: New setting to allow external control over start of puppet run

Since you're going to be writing your own locking mechanism for this, would it make sense to more fully wrap Puppet, where you're running "puppet agent -t" from inside the locking daemon, once you've gotten the lock? The -t will cause Puppet to exit after doing a single run, so your locking daemon could go back to waiting before trying to obtain a lock again.

Matthias Hörmann (JIRA)

unread,
Jun 12, 2018, 3:19:02 AM6/12/18
to puppe...@googlegroups.com

Well, it would be useful if the interface to the outside world remained the same, we would want e.g. Puppet to be started by init/systemd on boot, we would want to be able to restart it the normal way (which is also one of the reasons cron is not really all that useful, nor is the splay setting),...

Overall it would be nice to hide the implementation detail that avoids the concurrent Puppet runs as much as possible so we do not have to rework a variety of scripts that work on the assumption that they can trigger a Puppet run in the same way on all systems.

Eric Sorenson (JIRA)

unread,
Oct 22, 2018, 5:15:05 PM10/22/18
to puppe...@googlegroups.com

Eric Sorenson (JIRA)

unread,
Oct 22, 2018, 5:20:03 PM10/22/18
to puppe...@googlegroups.com
Eric Sorenson commented on New Feature PUP-8899
 
Re: New setting to allow external control over start of puppet run

Matthias Hörmann this seems like you want to overload a lot of "external" behaviour into puppet. If you already have an outside script to decide whether puppet should run, could that not also inject randomness into the restarts? This is a common pattern even for normal agent usage, if people want more sophistication than the built-in splay.

Eric Sorenson (JIRA)

unread,
Oct 22, 2018, 5:20:04 PM10/22/18
to puppe...@googlegroups.com
Eric Sorenson assigned an issue to Matthias Hörmann
 
Change By: Eric Sorenson
Assignee: Eric Sorenson Matthias Hörmann

Josh Cooper (JIRA)

unread,
Dec 12, 2019, 12:29:04 AM12/12/19
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-8899
 
Re: New setting to allow external control over start of puppet run

Thank you for filing this issue. However, we believe this change represents a technical direction that we have decided not to follow in Puppet. As such, we are closing this as “Won’t Do”.

Reply all
Reply to author
Forward
0 new messages