From 1aadb948aabeb61562ddb6076e368e355ae43d5e Mon Sep 17 00:00:00 2001 From: Dustin Specker Date: Fri, 22 Jul 2022 09:07:35 -0500 Subject: [PATCH] make 170-setup-gateway idempotent Before if we tried to add an address that was already added to the br-ex device the script would error out. Now, use replace which is idempotent. Change-Id: I34bbb361c4fa2f347431629f79753f75b458926f --- tools/deployment/developer/common/170-setup-gateway.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deployment/developer/common/170-setup-gateway.sh b/tools/deployment/developer/common/170-setup-gateway.sh index 270cb2c143..b626843556 100755 --- a/tools/deployment/developer/common/170-setup-gateway.sh +++ b/tools/deployment/developer/common/170-setup-gateway.sh @@ -16,7 +16,7 @@ set -xe # Assign IP address to br-ex : ${OSH_EXT_SUBNET:="172.24.4.0/24"} : ${OSH_BR_EX_ADDR:="172.24.4.1/24"} -sudo ip addr add ${OSH_BR_EX_ADDR} dev br-ex +sudo ip addr replace ${OSH_BR_EX_ADDR} dev br-ex sudo ip link set br-ex up : ${DNSMASQ_IMAGE:=docker.io/openstackhelm/neutron:xena-ubuntu_focal}