[Bug 1513923] [NEW] haproxy stop action does not work
Andreas Hasenack
andreas at canonical.com
Fri Nov 6 18:23:54 UTC 2015
Public bug reported:
With liberty:
*** 1.5.14-1~cloud2 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
"service haproxy stop" does not work:
The stop action in /etc/init.d/haproxy does this:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pid $pid --exec $HAPROXY || ret=$?
--pid is not a valid option for trusty's start-stop-daemon.
In trusty proper, that stop action does:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pidfile $PIDFILE --exec $HAPROXY || ret=$?
Example:
No haproxy running yet:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy
104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
let's start one:
root at juju-machine-1-lxc-2:~# service haproxy start
* Starting haproxy haproxy
...done.
Ok, it's there:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
Let's restart:
root at juju-machine-1-lxc-2:~# service haproxy restart
* Restarting haproxy haproxy
...done.
And now I have two!
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
Let's try to kill one just like the initscript does it, with the --pid option that does not exist in trusty:
root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
No /usr/sbin/haproxy found running; none killed.
Still alive:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
** Affects: cloud-archive
Importance: Undecided
Status: New
** Description changed:
- *** 1.5.14-1~cloud2 0
- 500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
+ With liberty:
+
+ *** 1.5.14-1~cloud2 0
+ 500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
"service haproxy stop" does not work:
The stop action does this:
- start-stop-daemon --quiet --oknodo --stop \
- --retry 5 --pid $pid --exec $HAPROXY || ret=$?
+ start-stop-daemon --quiet --oknodo --stop \
+ --retry 5 --pid $pid --exec $HAPROXY || ret=$?
-
- start-stop-daemon doesn't complain about --pid not being a valid option...
+ start-stop-daemon doesn't complain about --pid not being a valid
+ option...
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy
- 104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
+ 104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
root at juju-machine-1-lxc-2:~# service haproxy start
- * Starting haproxy haproxy
- ...done.
- root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
- 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
+ * Starting haproxy haproxy
+ ...done.
+ root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
+ 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~# service haproxy restart
- * Restarting haproxy haproxy
- ...done.
+ * Restarting haproxy haproxy
+ ...done.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
- 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
- 104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
- root at juju-machine-1-lxc-2:~#
+ 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
+ 104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
+ root at juju-machine-1-lxc-2:~#
- root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
+ root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
No /usr/sbin/haproxy found running; none killed.
- root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
- 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
- 104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
+ root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
+ 104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
+ 104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
** Description changed:
With liberty:
*** 1.5.14-1~cloud2 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
"service haproxy stop" does not work:
The stop action does this:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pid $pid --exec $HAPROXY || ret=$?
- start-stop-daemon doesn't complain about --pid not being a valid
- option...
+
+ --pid is not a valid option for trusty's start-stop-daemon.
+
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy
104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
root at juju-machine-1-lxc-2:~# service haproxy start
* Starting haproxy haproxy
...done.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
No /usr/sbin/haproxy found running; none killed.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
** Description changed:
With liberty:
*** 1.5.14-1~cloud2 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
"service haproxy stop" does not work:
The stop action does this:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pid $pid --exec $HAPROXY || ret=$?
+ --pid is not a valid option for trusty's start-stop-daemon.
- --pid is not a valid option for trusty's start-stop-daemon.
+ In trusty proper, that stop action does:
+ start-stop-daemon --quiet --oknodo --stop \
+ --retry 5 --pidfile $PIDFILE --exec $HAPROXY || ret=$?
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy
104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
root at juju-machine-1-lxc-2:~# service haproxy start
* Starting haproxy haproxy
...done.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~# service haproxy restart
* Restarting haproxy haproxy
...done.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
No /usr/sbin/haproxy found running; none killed.
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
--
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/1513923
Title:
haproxy stop action does not work
Status in Ubuntu Cloud Archive:
New
Bug description:
With liberty:
*** 1.5.14-1~cloud2 0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
"service haproxy stop" does not work:
The stop action in /etc/init.d/haproxy does this:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pid $pid --exec $HAPROXY || ret=$?
--pid is not a valid option for trusty's start-stop-daemon.
In trusty proper, that stop action does:
start-stop-daemon --quiet --oknodo --stop \
--retry 5 --pidfile $PIDFILE --exec $HAPROXY || ret=$?
Example:
No haproxy running yet:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy
104776 pts/2 S+ 0:00 | \_ grep --color=auto haproxy
let's start one:
root at juju-machine-1-lxc-2:~# service haproxy start
* Starting haproxy haproxy
...done.
Ok, it's there:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
Let's restart:
root at juju-machine-1-lxc-2:~# service haproxy restart
* Restarting haproxy haproxy
...done.
And now I have two!
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
Let's try to kill one just like the initscript does it, with the --pid option that does not exist in trusty:
root at juju-machine-1-lxc-2:~# start-stop-daemon --oknodo --stop --retry 5 --pid 104803 --exec /usr/sbin/haproxy
No /usr/sbin/haproxy found running; none killed.
Still alive:
root at juju-machine-1-lxc-2:~# ps fxaw|grep haproxy|grep -v grep
104786 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
104803 ? Ss 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root at juju-machine-1-lxc-2:~#
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1513923/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list