From de6650874da1470f10d4561fd1e33829eaef3414 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Sat, 19 Mar 2016 00:24:44 +0800 Subject: 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: I6a3d141af065e429bd1be1b7252f5c6df1fda3bb Closes-Bug: #1559238 --- docker/haproxy/ensure_latest_config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docker/haproxy/ensure_latest_config.sh') diff --git a/docker/haproxy/ensure_latest_config.sh b/docker/haproxy/ensure_latest_config.sh index 9a34f1758..4b84f3aed 100644 --- a/docker/haproxy/ensure_latest_config.sh +++ b/docker/haproxy/ensure_latest_config.sh @@ -1,12 +1,14 @@ #!/bin/bash +set -o errexit + CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ') NEW_CONFIG_HASH=$(sha1sum /var/lib/kolla/config_files/haproxy.cfg | cut -f1 -d' ') if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then changed=changed python /usr/local/bin/kolla_set_configs - /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf $(cat /run/haproxy.pid) + kill -USR2 $(pgrep -f /usr/sbin/haproxy-systemd-wrapper) fi echo $changed -- cgit v1.2.3