Issue #1273 has been updated by Ian Ward Comfort.
Subject changed from Can't restart puppetd from puppetd to puppetd ignores
SIGHUP during catalog run
Category changed from service to agent
Affected version set to 0.25.4
Reviving this dormant bug. (Not sure if it's really the same one still, but
this does roughly describe my problem.)
With Puppet 0.25.4, on RHEL5.4 (with EPEL RPMs) my puppetd cannot restart
itself with a SIGHUP during a catalog run. Here's syslog output with --debug:
<pre>
Mar 16 22:11:28 turk puppetd[14157]: Reopening log files
Mar 16 22:11:28 turk puppetd[14157]: Starting Puppet client version 0.25.4
Mar 16 22:11:28 turk puppetd[14157]: Retrieving plugin
Mar 16 22:11:37 turk puppetd[14157]: Caching catalog for turk.stanford.edu
Mar 16 22:11:47 turk puppetd[14157]: Applying configuration version '1268802690'
Mar 16 22:11:55 turk puppetd[14157]: Caught HUP; calling restart
Mar 16 22:12:31 turk puppetd[14157]: Finished catalog run in 45.94 seconds
Mar 16 22:12:56 turk puppetd[14157]: Caught HUP; calling restart
Mar 16 22:12:56 turk puppetd[14157]: Restarting with '/usr/sbin/puppetd --debug'
Mar 16 22:12:58 turk puppetd[14565]: Reopening log files
Mar 16 22:12:58 turk puppetd[14565]: Starting Puppet client version 0.25.4
</pre>
Note that the daemon **does** restart when HUP'd **after** the catalog run is
finished -- but the first HUP is swallowed without any action taken. This
seems to be a problem with Puppet::Agent's configure_delayed_restart (so I've
updated this ticket's category). I'd take a stab at a patch but honestly I
have no idea how this whole thing is supposed to work. (@needing_restart
doesn't seem to be used anywhere for the relevant purpose, so far as I can
tell.)
----------------------------------------
Bug #1273: puppetd ignores SIGHUP during catalog run
http://projects.reductivelabs.com/issues/1273
Author: Ask Hansen
Status: Needs more information
Priority: Normal
Assigned to:
Category: agent
Target version:
Patch: None
Affected version: 0.25.4
Keywords:
Branch:
It doesn't seem to be possible to restart puppetd from within puppetd.
<pre>
remote_file { "/etc/puppet.conf":
source => "puppet/puppet.conf",
mode => 444,
notify => Service[[puppet]],
}
service { "puppet":
ensure => true,
hasrestart => true,
restart => "kill -HUP @/var/run/puppet/puppetd.pid@",
hasstatus => true,
}
</pre>
Gives me
<pre>
May 31 17:06:50 diesel puppetdr27733:
(//Node[diesel]/dbserver/baseclass/centos/Remote_file[/etc/puppet.conf]/File[/etc/puppet.conf]/source)
replacing from source puppet:///dist/puppet/puppet.conf with contents
{md5}b71014d9e6b6b189591a2ea7bd4b1cf3
May 31 17:06:50 diesel puppetdr27825: Could not create PID file:
/var/run/puppet/puppetd.pid
May 31 17:06:50 diesel puppetdr27733:
(//Node[diesel]/dbserver/baseclass/centos/Service[puppet]/ensure) ensure
changed 'stopped' to 'running'
May 31 17:06:50 diesel puppetdr27733:
(//Node[diesel]/dbserver/baseclass/centos/Service[puppet]) Triggering 'refresh'
from 1 dependencies
</pre>
but puppetd doesn't actually restart.
I get the same result without the "restart" service parameter.
See also ticket #793.
--
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://reductivelabs.com/redmine/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.