Browse code

Create OVS bridge even if OVS_BRIDGE_MAPPINGS is not empty

in complex cases when mapping is defined in local.conf OVS bridge
can be created automatically.

Change-Id: I2e5e1068e77291d1d199cd698cec4946480c7601

Lenny Verkhovsky authored on 2019/11/12 22:54:32
Showing 1 changed files
... ...
@@ -41,8 +41,10 @@ function neutron_plugin_configure_plugin_agent {
41 41
     # Setup physical network bridge mappings.  Override
42 42
     # ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
43 43
     # complex physical network configurations.
44
-    if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
45
-        OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
44
+    if [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
45
+        if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]]; then
46
+            OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
47
+        fi
46 48
 
47 49
         # Configure bridge manually with physical interface as port for multi-node
48 50
         _neutron_ovs_base_add_bridge $OVS_PHYSICAL_BRIDGE