Devstack plugin: flush addresses on public bridge

Flush existing addresses on the public bridge before attaching
the physical interface on the gateway network to it.
This will avoid devstack errors due to misconfigurations of the
public bridge itself or previous errors during unstack.

Change-Id: I6b9a8b35ee21dbd82cb9e4b7d51ec3bbd0c73563
This commit is contained in:
Salvatore Orlando 2015-03-26 04:14:11 -07:00 committed by Kobi Samoray
parent b582c78def
commit af8c2190ee

View File

@ -178,6 +178,8 @@ function init_vmware_nsx {
# Try to create it anyway
sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE
sudo ovs-vsctl --may-exist add-port $PUBLIC_BRIDGE $NSX_GATEWAY_NETWORK_INTERFACE
# Flush all existing addresses on public bridge
sudo ip addr flush dev $PUBLIC_BRIDGE
nsx_gw_net_if_mac=$(ip link show $NSX_GATEWAY_NETWORK_INTERFACE | awk '/ether/ {print $2}')
sudo ip link set address $nsx_gw_net_if_mac dev $PUBLIC_BRIDGE
for address in $addresses; do