diff options
Diffstat (limited to 'docker/haproxy/start.sh')
| -rwxr-xr-x | docker/haproxy/start.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docker/haproxy/start.sh b/docker/haproxy/start.sh new file mode 100755 index 000000000..d1da4a607 --- /dev/null +++ b/docker/haproxy/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o errexit + +CMD='/usr/sbin/haproxy' +ARGS="-f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# We are intentionally not using exec so we can reload the haproxy config later +$CMD $ARGS + +# TODO(SamYaple): This has the potential for a race condition triggered by a +# config reload that could cause the container to exit +while [[ -e "/proc/$(cat /run/haproxy.pid)" ]]; do + sleep 5 +done |
