diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-27 18:13:04 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-28 00:50:29 -0700 |
| commit | 2cbccd7dc188c30ca81b1e96330df36425b0cf17 (patch) | |
| tree | e2427a2ff03abbc2ebf1be750e233454fd15bb2e /docker_templates | |
| parent | bd32c7a2dc0b10b0be209f969b2f8b4ad87c55f7 (diff) | |
| download | kolla-2cbccd7dc188c30ca81b1e96330df36425b0cf17.tar.gz kolla-2cbccd7dc188c30ca81b1e96330df36425b0cf17.zip | |
Move scripts for keepalive to docker_templates
Change-Id: I67ebbfa5a89b5d5c6ab2db78ded10151b95f7337
Partially-Implements: blueprint remove-docker-dir
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 |
