[Bug 1513923] Re: haproxy stop action does not work

Jorge Niedbalski 1513923 at bugs.launchpad.net
Fri Nov 6 19:02:22 UTC 2015


*** This bug is a duplicate of bug 1481737 ***
    https://bugs.launchpad.net/bugs/1481737

** Tags added: sts

** Description changed:

+ Observation:
+ 
+ On Trusty the start-stop-daemon (man start-stop-daemon) just supports
+ the  --pidfile parameter,  since utopic, that parameter was split on
+ --pidfile --ppid and --pid parameters.
+ 
+ On dev release the stop function actually makes use of the --pid , which
+ is unexistant on the trusty version of start-stop-daemon, for this reason
+ any backport made from dev to trusty will consequently not work. 
+ 
+ 
+ Note that this bug also affects Kilo backports.
+ 
  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:~#

** Description changed:

  Observation:
  
  On Trusty the start-stop-daemon (man start-stop-daemon) just supports
  the  --pidfile parameter,  since utopic, that parameter was split on
  --pidfile --ppid and --pid parameters.
  
  On dev release the stop function actually makes use of the --pid , which
  is unexistant on the trusty version of start-stop-daemon, for this reason
- any backport made from dev to trusty will consequently not work. 
- 
+ any backport made from dev to trusty will consequently not work.
  
  Note that this bug also affects Kilo backports.
+ 
+ Please also note that this is actually fixed on trusty-updates via
+ the bug http://pad.lv/1477198.
  
  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:~#

-- 
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:
  Observation:

  On Trusty the start-stop-daemon (man start-stop-daemon) just supports
  the  --pidfile parameter,  since utopic, that parameter was split on
  --pidfile --ppid and --pid parameters.

  On dev release the stop function actually makes use of the --pid
  parameter , which is unexistant on the trusty version of start-stop-
  daemon, for this reason any backport made from dev to trusty will
  consequently not work.

  Note that this bug also affects Kilo backports.

  Please also note that this is actually fixed on trusty-updates via
  the bug http://pad.lv/1477198.

  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