On Wed, Jun 27, 2012 at 10:01 AM, Felix Frank
<felix.fr...@alumni.tu-berlin.de> wrote:
> On 06/27/2012 10:51 AM, Matthew Burgess wrote:
>> is there something special about
>> the puppet service that it issuing the equivalent of 'service puppet
>> restart' doesn't actually work?
>
> Oh, it works, but think of what you're having puppet do: By calling the
> initscript and telling it to restart, it first has to "stop puppet",
> i.e., send TERM to the agent process. So the agent is committing suicide
> mid-run, taking the invocation of the initscript with it. Now nobody's
> there to start puppet up again.

Yeah, I did think of that, but I assumed that the 'service puppet
restart' command had been invoked already, i.e. before the puppet
agent had been killed.  Obviously, if the restart of the service is
being handled by two separate commands, e.g. 'service puppet stop'
followed by 'service puppet start' then yes, I completely understand
how I'm in the situation I'm now in.

> I've worked around this using exec { "echo service puppet restart | at
> now+5min" } in the past, but this is quite the hack. Personally I have
> found the cron model much more convenient that the long-running agent.

I'm using the long-running agent so that things like 'puppet kick'
work from the master, but that too could be implemented by using
passwordless ssh keys and just sshing from the master to the managed
node and kicking off the agent that way, I guess.  I'll give the 'at'
variation a try first though.  Thanks for the hint!

Regards,

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to