devstack 'cleanup-node' script should delete OVS bridges

When unstack'ing, cleanup-node.sh needs to also remove the ovs bridges
which were added when creating the node.

Failing to do this will cause subsequent runs of stack.sh to fail
because the bridge can't be re-created.

Change-Id: I5cc36e675d272f6dee3bc667133d1e7e082b0a55
Partial-bug: #1526403
This commit is contained in:
Devananda van der Veen 2016-01-04 17:12:01 -08:00 committed by Sivaramakrishna Garimella
parent b48289e8a2
commit 968e8329f4

View File

@ -23,3 +23,8 @@ if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then
virsh vol-list $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL
fi
sudo brctl delif br-$NAME ovs-$NAME || true
sudo ovs-vsctl del-port $NETWORK_BRIDGE ovs-$NAME || true
sudo ifconfig br-$NAME down || true
sudo brctl delbr br-$NAME || true