Package: puppet
Version: 3.8.5-1
Tags: patch
User: ubuntu-de...@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)
 * 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() {

Attachment: signature.asc
Description: PGP signature

Reply via email to