diff --git a/ci/common/net-config-multinode-os-net-config.yaml b/ci/common/net-config-multinode-os-net-config.yaml index 24545c3aa7..6e31088482 100644 --- a/ci/common/net-config-multinode-os-net-config.yaml +++ b/ci/common/net-config-multinode-os-net-config.yaml @@ -71,9 +71,16 @@ resources: let vni+=$subnode_index sed -i "s/vni/$vni/" /etc/os-net-config/config.json export interface_name="br-ex_$primary_private_ip" - # Until we are fully migrated to os-net-config we need to clean - # up the old bridge first created by devstack-gate - ovs-vsctl del-br br-ex + + # Until we are fully migrated to os-net-config we need + # to clean up the old bridge first created by + # devstack-gate. However, if $interface_name is already + # present in `ovs-vsctl show`, assume our br-ex is + # already configured. (Mainly for upgrade job, to avoid + # deleting br-ex during upgrade.) + if ! ovs-vsctl show | grep $interface_name &> /dev/null; then + ovs-vsctl del-br br-ex + fi } -