From 75a6454097071523a8617fcbea0f650d42c03341 Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Mon, 1 Aug 2016 14:41:10 -0400 Subject: [PATCH] neutron: Wait until ovs-vswitchd creates the bridge Seeing a race condition where lib/neutron code tries to set the MTU on br-ex before it exists. Thanks to some good grepping by sdague, it appears that the difference between lib/neutron and lib/neutron-legacy is that the initial bridge being created is br-int while in lib/neutron the initial bridge created is br-ex, which means there must be some kind of warm-up that occurs between the first bridge that is created by ovs-vswitchd and the second, and the second one created is much faster. So instead, let's just wait for the bridge to be created successfully. Change-Id: I271dc8b6ae5487c80d2a22153b3fc45fb247707f --- lib/neutron_plugins/ovs_base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base index 9e1421f5e6..f6d10ea4f9 100644 --- a/lib/neutron_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -19,7 +19,7 @@ function is_neutron_ovs_base_plugin { function _neutron_ovs_base_add_bridge { local bridge=$1 - local addbr_cmd="sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge" + local addbr_cmd="sudo ovs-vsctl -- --may-exist add-br $bridge" if [ "$OVS_DATAPATH_TYPE" != "system" ] ; then addbr_cmd="$addbr_cmd -- set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}"