]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Ensures that the Linux Bridge Plugin runs with L3 agent
authorGary Kotton <gkotton@redhat.com>
Tue, 11 Sep 2012 06:32:12 +0000 (06:32 +0000)
committerGary Kotton <gkotton@redhat.com>
Tue, 11 Sep 2012 06:44:39 +0000 (06:44 +0000)
Fixes bug 1048968

1. The external interface for the linux bridge will be created at run time.
The configuration parameter external_network_bridge should be set as empty.
That is, "external_network_bridge = ". The link between the network and
the physical interface should be done via the provider network parameters.
2. The plug operation for the linux bridge replaces the interface name
prefix with tap. We need to ensure that the prefix length is 3 characters.

Change-Id: Ib8e26bc1f603a1aff9560b4a40110a6824db5921

quantum/agent/l3_agent.py

index 96fe5b402f06cd9af3d11859d95fff9a58cdd341..bff54f834a9bc2d03b2d05f04de15b3abbc86eff 100644 (file)
@@ -37,7 +37,7 @@ from quantumclient.v2_0 import client
 LOG = logging.getLogger(__name__)
 NS_PREFIX = 'qrouter-'
 INTERNAL_DEV_PREFIX = 'qr-'
-EXTERNAL_DEV_PREFIX = 'qgw-'
+EXTERNAL_DEV_PREFIX = 'qg-'
 
 
 class RouterInfo(object):
@@ -116,7 +116,8 @@ class L3NATAgent(object):
 
         self.polling_interval = conf.polling_interval
 
-        if not ip_lib.device_exists(self.conf.external_network_bridge):
+        if (self.conf.external_network_bridge and
+            not ip_lib.device_exists(self.conf.external_network_bridge)):
             raise Exception("external network bridge '%s' does not exist"
                             % self.conf.external_network_bridge)