haproxy container can not be stopped/restarted gracefully
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Fix Released
|
Medium
|
Jeffrey Zhang |
Bug Description
in current master code [0], the haproxy container can not be stopped or restarted gracefully, after ran `kolla_
here is the reproduce step
1. deploy the kolla as normal
2. stop the haproxy,
$ time docker stop haproxy
haproxy
real 0m10.075s
user 0m0.027s
sys 0m0.009s
you can see the it takes 10 seconds to stop haproxy
check the docker daemon's log, a warning is raised.
Mar 18 13:48:25 localhost docker[915]: time="2016-
The root cause is that, we can not use `exec` for haproxy, so the root process ( pid=1 ) is not haproxy,
$ docker exec haproxy ps auxf
root 1 2.0 0.0 11636 1440 ? Ss+ 17:49 0:00 /bin/bash /usr/local/
root 15 0.0 0.0 48800 2460 ? Ss 17:49 0:00 /usr/sbin/haproxy -f /etc/haproxy/
the running `docker stop haproxy`, the kolla_start(pid=1) will receive the signal, but haproxy process not. So the haproxy can not be stopped and will be killed after 10 seconds.
the best solution should be use `haproxy-
[0] https:/
[1] https:/
summary: |
- haproxy container can not be stop/restart gracefully + haproxy container can not be stopped/restarted gracefully |
Changed in kolla: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → newton-1 |
assignee: | nobody → Jeffrey Zhang (jeffrey4l) |
Changed in kolla: | |
status: | Triaged → Confirmed |
Changed in kolla: | |
status: | Confirmed → In Progress |
Reviewed: https:/ /review. openstack. org/294701 /git.openstack. org/cgit/ openstack/ kolla/commit/ ?id=de6650874da 1470f10d4561fd1 e33829eaef3414
Committed: https:/
Submitter: Jenkins
Branch: master
commit de6650874da1470 f10d4561fd1e338 29eaef3414 zhang@99cloud. net>
Author: Jeffrey Zhang <jeffrey.
Date: Sat Mar 19 00:24:44 2016 +0800
Start the haproxy by using haproxy- system- wrapper
haproxy- system- wrapper is a solution for systemd from upstream. it can
handle the reload graceful.
Change-Id: I6a3d141af065e4 29bd1be1b7252f5 c6df1fda3bb
Closes-Bug: #1559238