Stop doesn't work on 14.04 (start-stop-daemon --pid not supported)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Invalid
|
High
|
Unassigned | ||
Kilo |
Invalid
|
High
|
Unassigned | ||
Liberty |
Fix Released
|
High
|
James Page | ||
trusty-backports |
Won't Fix
|
Undecided
|
Unassigned | ||
haproxy (Debian) |
Fix Released
|
Unknown
|
|||
haproxy (Ubuntu) |
Fix Released
|
High
|
James Page | ||
Trusty |
Fix Released
|
Critical
|
Unassigned | ||
Wily |
Fix Released
|
High
|
James Page | ||
Xenial |
Fix Released
|
High
|
James Page |
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@juju-
haproxy is running.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root 1513 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root@juju-
* Restarting haproxy haproxy
...done.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root 2277 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root@juju-
* Restarting haproxy haproxy
...done.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root 2523 906 0 14:33 pts/6 00:00:00 grep --color=auto haproxy
root@juju-
* Stopping haproxy haproxy
...done.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root 2584 906 0 14:34 pts/6 00:00:00 grep --color=auto haproxy
root@juju-
* Starting haproxy haproxy
...done.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2505 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2591 1 0 14:34 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
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@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
- Run service haproxy stop
root@juju-
* Stopping haproxy haproxy
...done.
root@juju-
haproxy 1269 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
haproxy 2169 1 0 14:33 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
[Other info]
Related bugs:
* bug 1481737: HAProxy init script does not work correctly with nbproc configuration option
Related branches
description: | updated |
Changed in haproxy (Ubuntu): | |
status: | New → Fix Released |
Changed in haproxy (Ubuntu Trusty): | |
status: | New → In Progress |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
importance: | Undecided → Critical |
Changed in cloud-archive: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in haproxy (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
tags: | added: kanban-cross-team |
summary: |
- Stop doesn't works on Trusty + Stop doesn't work on Trusty |
summary: |
- Stop doesn't work on Trusty + Stop doesn't work on 14.04 (start-stop-daemon --pid not supported) |
Changed in haproxy (Ubuntu Xenial): | |
status: | Fix Released → In Progress |
Changed in haproxy (Debian): | |
status: | Unknown → New |
Changed in haproxy (Ubuntu Xenial): | |
status: | In Progress → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Changed in haproxy (Debian): | |
status: | New → Fix Committed |
Changed in haproxy (Debian): | |
status: | Fix Committed → Fix Released |
Changed in haproxy (Juju Charms Collection): | |
status: | New → Invalid |
no longer affects: | haproxy (Juju Charms Collection) |
Changed in trusty-backports: | |
status: | New → Won't Fix |
The attached patch fixes the issue.
root@juju- testing- machine- 15:/home/ ubuntu# service haproxy start testing- machine- 15:/home/ ubuntu# ps -fea |grep haproxy haproxy. cfg -D -p /var/run/ haproxy. pid testing- machine- 15:/home/ ubuntu# service haproxy stop testing- machine- 15:/home/ ubuntu# ps -fea |grep haproxy testing- machine- 15:/home/ ubuntu# service haproxy status testing- machine- 15:/home/ ubuntu# service haproxy start
[ OK ] testing- machine- 15:/home/ ubuntu# ps -fea |grep haproxy haproxy. cfg -D -p /var/run/ haproxy. pid testing- machine- 15:/home/ ubuntu# service haproxy restart testing- machine- 15:/home/ ubuntu# ps -fea |grep haproxy haproxy. cfg -D -p /var/run/ haproxy. pid testing- machine- 15:/home/ ubuntu# service haproxy stop testing- machine- 15:/home/ ubuntu# service haproxy status
* Starting haproxy haproxy [ OK ]
root@juju-
haproxy 28338 1 0 15:29 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root@juju-
* Stopping haproxy haproxy [ OK ]
root@juju-
root@juju-
haproxy not running.
root@juju-
* Starting haproxy haproxy
root@juju-
haproxy 28398 1 0 15:29 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root@juju-
* Restarting haproxy haproxy [ OK ]
root@juju-
haproxy 28419 1 0 15:30 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/
root@juju-
* Stopping haproxy haproxy [ OK ]
root@juju-
haproxy not running.