From e9e2b4d104e51f3aafc0cb4ee285163da21ef8a2 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Mon, 21 May 2018 13:26:05 +0200 Subject: [PATCH] Don't delete br-ex on upgrade in multinode jobs The hook for os-net-config in multinode NIC config templates contains a call to `ovs-vsctl del-br br-ex` to remove the bridge we got from nodepool and initialize network config. We need to avoid executing that again on upgrade, or the Ansible process running the upgrade gets stuck. Change-Id: Ie36342402426d74fd528e320d60adc951bf8c9ac Closes-Bug: #1772040 --- ci/common/net-config-multinode-os-net-config.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 } -