[Bug 1494141] Re: HAProxy 1.5 init script does not terminate processes
Louis Bouchard
louis.bouchard at canonical.com
Wed Sep 16 15:34:15 UTC 2015
Hi,
haproxy 1.5.4 introduces the following change :
ret=0
- start-stop-daemon --quiet --oknodo --stop \
- --retry 5 --pidfile $PIDFILE --exec $HAPROXY || ret=$?
+ for pid in $(cat $PIDFILE); do
+ start-stop-daemon --quiet --oknodo --stop \
+ --retry 5 --pid $pid --exec $HAPROXY || ret=$?
+ done
start-stop-daemon --pidfile is replaced by --pid but this option is only
available in dpkg 1.17.6 and onward :
$ man start-stop-daemon (on Wily) :
[--pid] pid
Check for a process with the specified pid (since version 1.17.6). The pid must be a number greater than 0.
This is not available on trusty, which explains why the process does not
stop. I must admit that silently ignoring a false option is not an
appropriate behavior though
The reason for that change is that, if nbproc > 1 in the haproxy config
file, all the PIDs will be in one single /var/run/haproxy.pid file so in
order to kill each process, we must loop through the pid list.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1494141
Title:
HAProxy 1.5 init script does not terminate processes
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1494141/+subscriptions
More information about the Ubuntu-server-bugs
mailing list