service haproxy stop does not work

Bug #1512688 reported by Fredrik Edentoft
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
trusty-backports
Won't Fix
Undecided
Unassigned

Bug Description

haproxy 1.5.4 from trusty-backports on 14.04 LTS

Trying to stop service haproxy either by "service haproxy stop" or "/etc/init.d/haproxy stop" only results in pid-file being removed while the process is still running.
Starting or restarting the service again results in multiple instances, with possibly alternating configurations running.
At least the statistics report suggtests this as reloading the page shows different information about open or closed ports.

The problem as I've identified it is this part of haproxy_stop() inside of etc/init.d/haproxy

  for pid in $(cat $PIDFILE); do
    start-stop-daemon --quiet --oknodo --stop \
      --retry 5 --pid $pid --exec $HAPROXY || ret=$?

Ruinning this manually shows that start-stop-daemon cannot find the file named $pid.
Removing -pid $pid results in all running instances of haproxy is stopped as expected.

affects: launchpad → haproxy (Ubuntu)
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Does this issue affect the backport only, or does it also affect haproxy on Trusty or the release the backport was from?

Since you've reported this as affecting the backport I'll reassign to the backports project, but if it also affects an Ubuntu release without backports then we need a bug task for that and should fix it there too.

affects: haproxy (Ubuntu) → trusty-backports
Dan Streetman (ddstreet)
Changed in trusty-backports:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.