diff --git a/docker/centos/binary/keepalived/Dockerfile b/docker/centos/binary/keepalived/Dockerfile old mode 100755 new mode 100644 index 6aa0a4f100..3e2e4fa465 --- a/docker/centos/binary/keepalived/Dockerfile +++ b/docker/centos/binary/keepalived/Dockerfile @@ -7,8 +7,7 @@ RUN yum -y install \ socat \ && yum clean all -COPY keepalived.conf /etc/keepalived/ COPY start.sh check_alive.sh / -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/binary/keepalived/config-internal.sh b/docker/centos/binary/keepalived/config-internal.sh deleted file mode 120000 index 9e9437a008..0000000000 --- a/docker/centos/binary/keepalived/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../common/keepalived/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/keepalived/keepalived.conf b/docker/centos/binary/keepalived/keepalived.conf deleted file mode 120000 index d9794c9e59..0000000000 --- a/docker/centos/binary/keepalived/keepalived.conf +++ /dev/null @@ -1 +0,0 @@ -../../../common/keepalived/keepalived.conf \ No newline at end of file diff --git a/docker/common/keepalived/config-internal.sh b/docker/common/keepalived/config-internal.sh deleted file mode 100755 index 3d182f6355..0000000000 --- a/docker/common/keepalived/config-internal.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -. /opt/kolla/kolla-common.sh - -check_required_vars KEEPALIVED_HOST_PRIORITIES \ - PUBLIC_INTERFACE \ - PUBLIC_IP - -MY_HOSTNAME=`hostname` - -# here we unpack KEEPALIVED_HOST_PRIORITIES hostname:priority pairs and match -# them with current hostname, if it's there -for i in ${KEEPALIVED_HOST_PRIORITIES//,/ }; do - HOST_PRIORITY=(${i//:/ }) - if [ "$MY_HOSTNAME" == "${HOST_PRIORITY[0]}" ]; then - KEEPALIVED_PRIORITY=${HOST_PRIORITY[1]} - fi -done - -if [ -z "$KEEPALIVED_PRIORITY" ]; then - echo "ERROR: missing hostname in KEEPALIVED_HOST_PRIORITIES: $MY_HOSTNAME" >&2 - exit 1 -fi - -sed -i ' - s|@PUBLIC_INTERFACE@|'$PUBLIC_INTERFACE'|g - s|@PUBLIC_IP@|'$PUBLIC_IP'|g - s|@KEEPALIVED_PRIORITY@|'$KEEPALIVED_PRIORITY'|g -' /etc/keepalived/keepalived.conf - -exec /usr/sbin/keepalived -nld -p /run/keepalived.pid diff --git a/docker/common/keepalived/keepalived.conf b/docker/common/keepalived/keepalived.conf deleted file mode 100755 index 2a58fc018d..0000000000 --- a/docker/common/keepalived/keepalived.conf +++ /dev/null @@ -1,19 +0,0 @@ -vrrp_script check_alive { - script "/check_alive.sh" - interval 2 - weight -10 -} - -vrrp_instance Floating { - state MASTER - interface @PUBLIC_INTERFACE@ - virtual_router_id 51 - priority @KEEPALIVED_PRIORITY@ - advert_int 1 - virtual_ipaddress { - @PUBLIC_IP@ - } - track_script { - check_alive - } -} diff --git a/docker/common/keepalived/start.sh b/docker/common/keepalived/start.sh index 64f47e2952..93eba47636 100755 --- a/docker/common/keepalived/start.sh +++ b/docker/common/keepalived/start.sh @@ -7,7 +7,7 @@ ARGS="-nld -p /run/keepalived.pid" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index 3c959303aa..36fe94da8a 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -267,9 +267,7 @@ In order for each service to function, there is a minimum set of required variab # Keepalived - KEEPALIVED_HOST_PRIORITIES - PUBLIC_INTERFACE - PUBLIC_IP + None # Keystone