From b9af0a397325677a2a2b9ec5f0051de31832722e Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 20 Aug 2012 04:32:10 -0400 Subject: [PATCH] Ensure that LB agent does not terminate if interface already exists in bridge Fixes bug 1038783 Change-Id: Iaa4778562b4efc13919341832f5281b1516f8f8c --- .../linuxbridge/agent/linuxbridge_quantum_agent.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py b/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py index 7cd12cb5c..ea3651a4f 100755 --- a/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py +++ b/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py @@ -226,8 +226,13 @@ class LinuxBridge: # Check if the interface is part of the bridge if not self.interface_exists_on_bridge(bridge_name, interface): - utils.execute(['brctl', 'addif', bridge_name, interface], - root_helper=self.root_helper) + try: + utils.execute(['brctl', 'addif', bridge_name, interface], + root_helper=self.root_helper) + except Exception as e: + LOG.error("Unable to add %s to %s! Exception: %s", interface, + bridge_name, e) + return def add_tap_interface(self, network_id, physical_interface, vlan_id, tap_device_name): -- 2.45.2