]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Ensure that LB agent does not terminate if interface already exists in bridge
authorGary Kotton <gkotton@redhat.com>
Mon, 20 Aug 2012 08:32:10 +0000 (04:32 -0400)
committerGary Kotton <gkotton@redhat.com>
Mon, 20 Aug 2012 10:44:07 +0000 (06:44 -0400)
Fixes bug 1038783

Change-Id: Iaa4778562b4efc13919341832f5281b1516f8f8c

quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py

index 7cd12cb5c712a0f91d670f531604b70e457d0dc0..ea3651a4f05b84ddba955cbc50d4aa765e4e57f8 100755 (executable)
@@ -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):