Skip to content

Instantly share code, notes, and snippets.

@dave-tucker
Created June 11, 2014 14:40
Show Gist options
  • Save dave-tucker/c5dc5093b87fb3ba1e0c to your computer and use it in GitHub Desktop.
Save dave-tucker/c5dc5093b87fb3ba1e0c to your computer and use it in GitHub Desktop.
0001-Fix-race-condition-with-creation-of-br-ex.patch
From 78aad5b5470d95f4ac4d9fe12a460bda84e59aee Mon Sep 17 00:00:00 2001
From: Dave Tucker <[email protected]>
Date: Wed, 11 Jun 2014 15:27:51 +0100
Subject: [PATCH] Fix race condition with creation of br-ex
---
lib/neutron_plugins/ovs_base | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index 1e293a1..8e238da 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -65,8 +65,9 @@ function _neutron_ovs_base_configure_l3_agent {
iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge $PUBLIC_BRIDGE
neutron-ovs-cleanup
- sudo ovs-vsctl --no-wait -- --may-exist add-br $PUBLIC_BRIDGE
- sudo ovs-vsctl --no-wait br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
+ # --no-wait causes a race condition is $PUBLIC_BRIDGE is not up when ip addr flush is called
+ sudo ovs-vsctl -- --may-exist add-br $PUBLIC_BRIDGE
+ sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
# ensure no IP is configured on the public bridge
sudo ip addr flush dev $PUBLIC_BRIDGE
}
--
1.9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment