neutron-cleanup skips ports marked skip_cleanup=true
The neutron-cleanup script was destroying the entire neutron integration bridge including ports that are tagged to skip the cleanup process. This adds logic to skip those ports. Change-Id: If77933310b5602c5e0d4197584d66d929fc4d8db Closes-Bug: #1804288
This commit is contained in:
parent
b01b1a7f72
commit
a9c0fa5ce5
@ -10,11 +10,17 @@ then
|
||||
TUN_BRIDGE=`crudini --get ${NEUTRON_OVS_CONF} ovs tunnel_bridge`
|
||||
fi
|
||||
|
||||
for br in ${INT_BRIDGE:-"br-int"} ${TUN_BRIDGE:-"br-tun"};
|
||||
for port in `ovs-vsctl list-ports ${INT_BRIDGE:-"br-int"}`;
|
||||
do
|
||||
ovs-vsctl --if-exists del-br $br
|
||||
skip_cleanup=`ovs-vsctl --if-exists get Interface $port external_ids:skip_cleanup`
|
||||
if ! [[ "x$skip_cleanup" == "x\"true\"" ]];
|
||||
then
|
||||
ovs-vsctl del-port ${INT_BRIDGE:-"br-int"} $port
|
||||
fi
|
||||
done
|
||||
|
||||
ovs-vsctl --if-exists del-br ${TUN_BRIDGE:-"br-tun"}
|
||||
|
||||
# Clean up trunk port bridges
|
||||
for br in $(ovs-vsctl list-br | egrep 'tbr-[0-9a-f\-]+'); do
|
||||
ovs-vsctl --if-exists del-br $br
|
||||
|
Loading…
Reference in New Issue
Block a user