From 54877a770d4d04b4e51fdb4ee492cc6c59c8c333 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Tue, 29 Nov 2016 15:58:53 -0800 Subject: [PATCH] Fix devstack with linuxbridge without l3 agent The linuxbridge agent for Neutron expects that the public bridge will already be created by the time it starts. On devstack, this only occurs as part of the l3 agent configuration. If a compute node doesn't have an l3 agent and is using a linuxbridge agent, then br-ex won't be created and the process will not be able to start (causing stack.sh to fail). This causes the gate-grenade-dsvm-neutron-linuxbridge-multinode-nv gate to fail. To avoid the issue, skip the bridge mappings setup unless L3 is configured. This is done in a backward compatible fashion: if localrc uses the old q-l3 tags, the is_service_enabled neutron-l3 would not be able to succeed. Closes-Bug: #1643562 (cherry picked from commit 1c08b191fd04e028a8d908c9ccb4fdc536248c96) Change-Id: I292ff0dc080fb84b5f879ba2f00f03eff295b55b --- lib/neutron_plugins/linuxbridge_agent | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/neutron_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent index d0de2f5e5d..0c8ccb8718 100644 --- a/lib/neutron_plugins/linuxbridge_agent +++ b/lib/neutron_plugins/linuxbridge_agent @@ -62,7 +62,9 @@ function neutron_plugin_configure_plugin_agent { LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE fi if [[ "$PUBLIC_BRIDGE" != "" ]] && [[ "$PUBLIC_PHYSICAL_NETWORK" != "" ]]; then - iniset /$Q_PLUGIN_CONF_FILE linux_bridge bridge_mappings "$PUBLIC_PHYSICAL_NETWORK:$PUBLIC_BRIDGE" + if is_service_enabled q-l3 || is_service_enabled neutron-l3; then + iniset /$Q_PLUGIN_CONF_FILE linux_bridge bridge_mappings "$PUBLIC_PHYSICAL_NETWORK:$PUBLIC_BRIDGE" + fi fi if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS