From 7e845f4af6f89253d9c47645875aa67ef24ebee3 Mon Sep 17 00:00:00 2001 From: Sumit Naiksatam Date: Thu, 17 May 2012 16:14:52 -0700 Subject: Fix for Quantum LinuxBridge Intf driver plug call The current implementation of the plug operation tries to assign an IP address to a bridge even if it already has one. The fix is to do this only when a new device is created. The check for a new device was already being performed however the IP address was being set outside that check. That's being corrected here, minor fix. bug 1000580 Change-Id: I45215a3ca87a32ef4c2a2f76bab9b743eabb525e --- nova/network/linux_net.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index 92f0afb4c..b2b68b5b7 100755 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -1154,10 +1154,10 @@ class QuantumLinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver): utils.execute('ip', 'link', 'set', bridge, 'up', run_as_root=True) LOG.debug(_("Done starting bridge %s"), bridge) - full_ip = '%s/%s' % (network['dhcp_server'], - network['cidr'].rpartition('/')[2]) - utils.execute('ip', 'address', 'add', full_ip, 'dev', bridge, - run_as_root=True) + full_ip = '%s/%s' % (network['dhcp_server'], + network['cidr'].rpartition('/')[2]) + utils.execute('ip', 'address', 'add', full_ip, 'dev', bridge, + run_as_root=True) return dev -- cgit