Issue #17160 has been updated by Konrad Scherer.

Thank you for your response.

I agree that something like service `{'puppet': enable=>false, ensure=>stopped 
}` can be used to enforce the site policy. I just confirmed that with 3.0.1 
that this definition caused the puppet agent run to be terminated mid run. This 
is reported as a failed run. The next puppet run triggered by puppet commander 
would then succeed. Every upgrade of puppet would cause a failed run to be 
reported for every node. It is ugly but tolerable. This group of failed run 
reports would be solved by the addition of a graceful shutdown.

I did not want to suggest that the puppet agent daemon and puppetcommander 
shouldn't be run at the same time. The current behavior of the puppet agent 
daemon means that combining the two will trigger more puppet runs than 
necessary. I was hoping that the daemon and puppetcommander could work together 
in an optimal way. My proposed patch would allow a running puppet agent daemon 
and puppet commander to work together in a better way. The patch would reset 
the 'time since last run' counter if the agent daemon receives a USR1 signal. 
If you ignore everything else, it makes sense that the 'time since last run' 
counter would take manually triggered runs into account. It just happens that 
it would also allow some redundancy in case there are problems with the 
activemq network. I have had situations where the activemq service needed to be 
restarted but puppet commander was not able to communicate with the node and no 
runs were scheduled.
----------------------------------------
Feature #17160: Using puppet agent with external agent run schedulers like 
puppetcommander
https://projects.puppetlabs.com/issues/17160#change-80617

Author: Konrad Scherer
Status: Needs More Information
Priority: Normal
Assignee: Konrad Scherer
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


I have been using puppetcommander with puppet for over a year now. I feel this 
is the best solution to controlling the load on my puppet masters.

With the puppet package from puppetlabs, after a new puppet agent package is 
installed, the puppet agent is automatically started in daemon mode. When using 
puppetcommander the mcollective agent puppetd will detect that the agent is 
running and send a USR1 signal instead of attempting to run the agent. But now 
both the puppet agent and puppetcommander are triggering puppet runs on the 
master, which totally negates the load leveling effect.

I would like to have the puppet agent daemon and external agent run schedulers 
work better together:

- Make the puppet agent daemon reset the run interval after an agent run 
triggered by signal USR1. I have an untested patch to puppet daemon which I 
think will handle this here: 
https://github.com/kscherer/puppet/tree/reset_next_agent_run_after_signal This 
way with a larger runinterval I can get the best of both worlds if 
puppetcommander stops running. What do you think?

- Also useful would be a way to tell a currently running puppet agent daemon to 
exit after the next run. Currently there is no way that I can tell the puppet 
agent service to stop while running puppet. This will kill the puppet agent run 
mid run and the run fails. Yes I am using puppet to manage puppet, as it should 
be ;-)

Thank you for your time and puppet.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to