From d663e29d40b04017c515c19891bb846ea984acde Mon Sep 17 00:00:00 2001 From: Kahou Lei Date: Sat, 24 Oct 2015 12:18:57 -0700 Subject: [PATCH] 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 --- lib/neutron-legacy | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 4e51425ffc..ecc45edbf7 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -553,9 +553,11 @@ function create_neutron_initial_network { die_if_not_set $LINENO SUBNET_V6_ID "Failure creating SUBNET_V6_ID for $PROVIDER_SUBNET_NAME_V6 $TENANT_ID" fi - sudo ip link set $OVS_PHYSICAL_BRIDGE up - sudo ip link set br-int up - sudo ip link set $PUBLIC_INTERFACE up + if [[ $Q_AGENT == "openvswitch" ]]; then + sudo ip link set $OVS_PHYSICAL_BRIDGE up + sudo ip link set br-int up + sudo ip link set $PUBLIC_INTERFACE up + fi else NET_ID=$(neutron net-create --tenant-id $TENANT_ID "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2) 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 { function start_neutron_l2_agent { run_process q-agt "$AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE" - if is_provider_network; then + if is_provider_network && [[ $Q_AGENT == "openvswitch" ]]; then sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_PHYSICAL_BRIDGE $PUBLIC_INTERFACE sudo ip link set $OVS_PHYSICAL_BRIDGE up sudo ip link set br-int up