Use a random virtual_router_id in the keepalived

Use a random virtual_router_id in case there are multi keepalived
instances exist at the same time in the gate.

Closes-Bug: #1568818
Change-Id: Iebb3dec088a21820e641b63bb2a5f40586d1df8c
(cherry picked from commit f93ed9a935)
This commit is contained in:
Jeffrey Zhang 2016-04-11 20:11:33 +08:00
parent 68ca8942cb
commit c07c8b4cfa
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export KOLLA_BASE=$1
export KOLLA_TYPE=$2
export KEEPALIVED_VIRTUAL_ROUTER_ID=$(shuf -i 1-255 -n 1)
function copy_logs {
cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* /tmp/logs/kolla/
@ -58,6 +59,7 @@ function write_configs {
kolla_base_distro: "${KOLLA_BASE}"
kolla_install_type: "${KOLLA_TYPE}"
kolla_internal_vip_address: "169.254.169.10"
keepalived_virtual_router_id: "${KEEPALIVED_VIRTUAL_ROUTER_ID}"
docker_restart_policy: "never"
network_interface: "${PRIVATE_INTERFACE}"
neutron_external_interface: "fake_interface"