Browse code

Ensure the Linux Bridge agent can be used with provider networking

The root cause is that when provider network is used, devstack
is trying to build ovs related interface.

We need to make a condition such that if linux bridge is used, don't
build any ovs related interface.

Change-Id: I7f26ce7893a0ecce55b3467cd5621abf25745b8e
Closes-bug: #1509705

Kahou Lei authored on 2015/10/25 04:18:57
Showing 1 changed files
... ...
@@ -553,9 +553,11 @@ function create_neutron_initial_network {
553 553
             die_if_not_set $LINENO SUBNET_V6_ID "Failure creating SUBNET_V6_ID for $PROVIDER_SUBNET_NAME_V6 $TENANT_ID"
554 554
         fi
555 555
 
556
-        sudo ip link set $OVS_PHYSICAL_BRIDGE up
557
-        sudo ip link set br-int up
558
-        sudo ip link set $PUBLIC_INTERFACE up
556
+        if [[ $Q_AGENT == "openvswitch" ]]; then
557
+            sudo ip link set $OVS_PHYSICAL_BRIDGE up
558
+            sudo ip link set br-int up
559
+            sudo ip link set $PUBLIC_INTERFACE up
560
+        fi
559 561
     else
560 562
         NET_ID=$(neutron net-create --tenant-id $TENANT_ID "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2)
561 563
         die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PRIVATE_NETWORK_NAME $TENANT_ID"
... ...
@@ -701,7 +703,7 @@ function start_neutron_service_and_check {
701 701
 function start_neutron_l2_agent {
702 702
     run_process q-agt "$AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
703 703
 
704
-    if is_provider_network; then
704
+    if is_provider_network && [[ $Q_AGENT == "openvswitch" ]]; then
705 705
         sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_PHYSICAL_BRIDGE $PUBLIC_INTERFACE
706 706
         sudo ip link set $OVS_PHYSICAL_BRIDGE up
707 707
         sudo ip link set br-int up