summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Naiksatam <snaiksat@cisco.com>2012-05-17 16:14:52 -0700
committerSumit Naiksatam <snaiksat@cisco.com>2012-05-17 16:20:22 -0700
commit7e845f4af6f89253d9c47645875aa67ef24ebee3 (patch)
tree3f94a53ee02ff5ab0df00dc7dbd90e2e051797f9
parent51e745fc1d9e44e04b55ecf2317df0b386d4eb05 (diff)
downloadnova-7e845f4af6f89253d9c47645875aa67ef24ebee3.tar.gz
nova-7e845f4af6f89253d9c47645875aa67ef24ebee3.tar.xz
nova-7e845f4af6f89253d9c47645875aa67ef24ebee3.zip
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
-rwxr-xr-xnova/network/linux_net.py8
1 files 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