[Pkg-puppet-devel] Bug#818267: Service restart fails because process has not exited
Martin Pitt
martin.pitt at ubuntu.com
Tue Mar 15 09:29:11 UTC 2016
Package: puppet
Version: 3.8.5-1
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch xenial
Hello,
In https://launchpad.net/bugs/1315021 it was reported that restarting
puppet and puppetmaster sometimes fails when the operation takes more
than one second. This is due to an inappropriate use of
start-stop-daemon which was missing a poll/retry loop. This got fixed
upstream four years ago in
https://github.com/puppetlabs/puppet/commit/5a23d8b95bf0558
but as the Debian package does not use that but its own init script,
that fix didn't apply to Debian.
Straightforward patch (as applied to the Ubuntu package for about a
year) attached.
Thanks for considering,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
* debian/puppet{,master}.init: Wait until the puppet and puppetmaster
daemons are actually stopped before returning. (LP: #1315021)
diff -Nru puppet-3.8.5/debian/puppet.init puppet-3.8.5/debian/puppet.init
--- puppet-3.8.5/debian/puppet.init 2016-01-28 10:44:22.000000000 +0100
+++ puppet-3.8.5/debian/puppet.init 2016-03-15 10:07:25.000000000 +0100
@@ -34,7 +34,7 @@
}
stop_puppet_agent() {
- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
+ start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile $PIDFILE
}
status_puppet_agent() {
diff -Nru puppet-3.8.5/debian/puppetmaster.init puppet-3.8.5/debian/puppetmaster.init
--- puppet-3.8.5/debian/puppetmaster.init 2016-01-28 10:44:22.000000000 +0100
+++ puppet-3.8.5/debian/puppetmaster.init 2016-03-15 10:07:25.000000000 +0100
@@ -50,7 +50,7 @@
}
stop_puppet_master() {
- start-stop-daemon --stop --quiet --oknodo --pidfile "${PIDFILE}"
+ start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile "${PIDFILE}"
}
status_puppet_master() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-puppet-devel/attachments/20160315/d46816f5/attachment.sig>
More information about the Pkg-puppet-devel
mailing list