summaryrefslogtreecommitdiff
path: root/docker/haproxy
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-09-25 09:19:07 +0000
committerSam Yaple <sam@yaple.net>2015-09-25 11:06:27 +0000
commit89ecfc164ed92696de4c5cd2c0f90f23c1ad3784 (patch)
tree5ef58eb7ee0a81276370ef212b18caeb89e09602 /docker/haproxy
parent9c54b0afff2c522960d6a13eb4885cb2a0a53ce0 (diff)
downloadkolla-89ecfc164ed92696de4c5cd2c0f90f23c1ad3784.tar.gz
kolla-89ecfc164ed92696de4c5cd2c0f90f23c1ad3784.zip
Replace config-external - haproxy keepalived
Change-Id: I668c31401305713e720f0f0ae8ec18e320ea1c76 Partially-Implements: blueprint replace-config-external
Diffstat (limited to 'docker/haproxy')
-rwxr-xr-xdocker/haproxy/ensure_latest_config.sh2
-rwxr-xr-xdocker/haproxy/start.sh10
2 files changed, 5 insertions, 7 deletions
diff --git a/docker/haproxy/ensure_latest_config.sh b/docker/haproxy/ensure_latest_config.sh
index b91189ca5..af20175a6 100755
--- a/docker/haproxy/ensure_latest_config.sh
+++ b/docker/haproxy/ensure_latest_config.sh
@@ -1,7 +1,7 @@
#!/bin/bash
CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ')
-NEW_CONFIG_HASH=$(sha1sum /opt/kolla/haproxy/haproxy.cfg | cut -f1 -d' ')
+NEW_CONFIG_HASH=$(sha1sum /opt/kolla/config_files/haproxy.cfg | cut -f1 -d' ')
if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then
changed=changed
diff --git a/docker/haproxy/start.sh b/docker/haproxy/start.sh
index d1da4a607..629c85254 100755
--- a/docker/haproxy/start.sh
+++ b/docker/haproxy/start.sh
@@ -1,17 +1,15 @@
#!/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
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
# We are intentionally not using exec so we can reload the haproxy config later
-$CMD $ARGS
+$CMD
# TODO(SamYaple): This has the potential for a race condition triggered by a
# config reload that could cause the container to exit