Browse code

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

Sean M. Collins authored on 2016/08/02 03:41:10
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ function is_neutron_ovs_base_plugin {
19 19
 
20 20
 function _neutron_ovs_base_add_bridge {
21 21
     local bridge=$1
22
-    local addbr_cmd="sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge"
22
+    local addbr_cmd="sudo ovs-vsctl -- --may-exist add-br $bridge"
23 23
 
24 24
     if [ "$OVS_DATAPATH_TYPE" != "system" ] ; then
25 25
         addbr_cmd="$addbr_cmd -- set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}"