From 968e8329f4adaee30538a7339f6fb9ca2e239ec3 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Mon, 4 Jan 2016 17:12:01 -0800 Subject: [PATCH] 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 --- devstack/tools/ironic/scripts/cleanup-node.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devstack/tools/ironic/scripts/cleanup-node.sh b/devstack/tools/ironic/scripts/cleanup-node.sh index 2d9e73e414..e10c04bbc6 100755 --- a/devstack/tools/ironic/scripts/cleanup-node.sh +++ b/devstack/tools/ironic/scripts/cleanup-node.sh @@ -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