[Bug 1477198] Re: Stop doesn't work on 14.04 (start-stop-daemon --pid not supported)
Andreas Hasenack
andreas at canonical.com
Mon Nov 9 19:34:29 UTC 2015
This worked for me in trusty with the proposed cloud-archive repository.
Before, when I restarted haproxy, I got an extra process:
root at juju-machine-2-lxc-0:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-2-lxc-0:~# ps fxaw|grep haproxy
32215 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
32547 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
Now it's just one as expected, replacing the one that was running before:
root at juju-machine-2-lxc-0:~# ps fxaw|grep haproxy
33493 pts/3 S+ 0:00 \_ grep --color=auto haproxy
33483 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -D -sf 33115
root at juju-machine-2-lxc-0:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-2-lxc-0:~# ps fxaw|grep haproxy
33510 pts/3 S+ 0:00 \_ grep --color=auto haproxy
33507 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
Using version 1.5.14-1ubuntu0.15.10.1~cloud0:
root at juju-machine-2-lxc-0:~# apt-cache policy haproxy
haproxy:
Installed: 1.5.14-1ubuntu0.15.10.1~cloud0
Candidate: 1.5.14-1ubuntu0.15.10.1~cloud0
Version table:
*** 1.5.14-1ubuntu0.15.10.1~cloud0 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-proposed/liberty/main amd64 Packages
100 /var/lib/dpkg/status
1.5.14-1~cloud2 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
1.4.24-2ubuntu0.2 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
1.4.24-2 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1477198
Title:
Stop doesn't work on 14.04 (start-stop-daemon --pid not supported)
Status in Ubuntu Cloud Archive:
Invalid
Status in Ubuntu Cloud Archive kilo series:
Invalid
Status in Ubuntu Cloud Archive liberty series:
In Progress
Status in haproxy package in Ubuntu:
Fix Released
Status in haproxy source package in Trusty:
Fix Released
Status in haproxy source package in Wily:
Fix Committed
Status in haproxy source package in Xenial:
Fix Released
Status in haproxy package in Debian:
New
Bug description:
[Description]
The stop method is not working properly. I removed the --oknodo &&
--quiet and is returning (No /usr/sbin/haproxy found running; none
killed)
I think this is a regression caused by the incorporation of this lines
on the stop method:
+ for pid in $(cat $PIDFILE); do
+ start-stop-daemon --quiet --oknodo --stop \
+ --retry 5 --pid $pid --exec $HAPROXY || ret=$?
root at juju-machine-1-lxc-0:~# service haproxy status
haproxy is running.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 1513 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root at juju-machine-1-lxc-0:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 2277 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root at juju-machine-1-lxc-0:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 2523 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root at juju-machine-1-lxc-0:~# service haproxy stop
* Stopping haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 2584 906 0 14:34 pts/6 00:00:00 grep --color=auto haproxy
root at juju-machine-1-lxc-0:~# service haproxy start
* Starting haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2591 1 0 14:34 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 2610 906 0 14:34 pts/6 00:00:00 grep --color=auto haproxy
[Impact]
- 'service stop/restart' doesn't works properly.
[Test Case]
- Install latest haproxy package.
- Run service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
- Run service haproxy stop
root at juju-machine-1-lxc-0:~# service haproxy stop
* Stopping haproxy haproxy
...done.
root at juju-machine-1-lxc-0:~# ps -ef| grep haproxy
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
[Other info]
Related bugs:
* bug 1481737: HAProxy init script does not work correctly with nbproc configuration option
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1477198/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list