Skip to content

Commit

Permalink
Fix for Quantum LinuxBridge Intf driver plug call
Browse files Browse the repository at this point in the history
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
  • Loading branch information
snaiksat committed May 17, 2012
1 parent 51e745f commit 7e845f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nova/network/linux_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,10 +1154,10 @@ def plug(self, network, mac_address, gateway=True):
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

Expand Down

0 comments on commit 7e845f4

Please sign in to comment.