Skip to content

Commit

Permalink
Nova network needs to take care of existing alias
Browse files Browse the repository at this point in the history
Nova network should take care of existing aliases on bridge
interfaces when it adds address on top of the list.

Change-Id: Ife54c9eba64906406f7c44a66b596f3162ad16b6
Fixes: bug #1077066
  • Loading branch information
Édouard Thuleau committed Feb 15, 2013
1 parent f9b0b9f commit f5a45dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nova/network/linux_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,10 @@ def ensure_bridge(_self, bridge, interface, net_attrs=None, gateway=True,
for line in out.split('\n'):
fields = line.split()
if fields and fields[0] == 'inet':
params = fields[1:-1]
if fields[-2] == 'secondary':
params = fields[1:-2]
else:
params = fields[1:-1]
_execute(*_ip_bridge_cmd('del', params, fields[-1]),
run_as_root=True, check_exit_code=[0, 2, 254])
_execute(*_ip_bridge_cmd('add', params, bridge),
Expand Down

0 comments on commit f5a45dd

Please sign in to comment.