diff options
Diffstat (limited to 'docker_templates')
| -rwxr-xr-x[l---------] | docker_templates/keepalived/check_alive.sh | 7 | ||||
| -rwxr-xr-x[l---------] | docker_templates/keepalived/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/keepalived/start.sh | 21 |
3 files changed, 36 insertions, 3 deletions
diff --git a/docker_templates/keepalived/check_alive.sh b/docker_templates/keepalived/check_alive.sh index 3390a28d7..8c2684f10 120000..100755 --- a/docker_templates/keepalived/check_alive.sh +++ b/docker_templates/keepalived/check_alive.sh @@ -1 +1,6 @@ -../../docker/common/keepalived/check_alive.sh
\ No newline at end of file +#!/bin/bash + +# This will return 0 when it successfully talks to the haproxy daemon via the socket +# Failures return 1 + +echo "show info" | socat unix-connect:/run/haproxy.sock stdio diff --git a/docker_templates/keepalived/config-external.sh b/docker_templates/keepalived/config-external.sh index 6b3a07c29..d7ff97826 120000..100755 --- a/docker_templates/keepalived/config-external.sh +++ b/docker_templates/keepalived/config-external.sh @@ -1 +1,10 @@ -../../docker/common/keepalived/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/keepalived/keepalived.conf" +TARGET="/etc/keepalived/keepalived.conf" +OWNER="root" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/keepalived/start.sh b/docker_templates/keepalived/start.sh index 65aea95d0..a122526e4 120000..100755 --- a/docker_templates/keepalived/start.sh +++ b/docker_templates/keepalived/start.sh @@ -1 +1,20 @@ -../../docker/common/keepalived/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/sbin/keepalived" +ARGS="-nld -p /run/keepalived.pid" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +modprobe ip_vs + +# Workaround for bug #1485079 +if [ -f /run/keepalived.pid ]; then + rm /run/keepalived.pid +fi + +exec $CMD $ARGS |
