diff options
| author | Édouard Thuleau <edouard.thuleau@cloudwatt.com> | 2013-02-15 12:49:37 +0100 |
|---|---|---|
| committer | Édouard Thuleau <edouard.thuleau@cloudwatt.com> | 2013-02-15 13:01:07 +0100 |
| commit | f5a45dde519c521921240dfda835a805f1eb05b3 (patch) | |
| tree | 476bfec7b310cb2be247130a4015183bea634bdf | |
| parent | f9b0b9f2d33fe97f241415e248b690a61b9f8098 (diff) | |
Nova network needs to take care of existing alias
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
| -rw-r--r-- | nova/network/linux_net.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index cb23e77b6..e2fa963c6 100644 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -1465,7 +1465,10 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver): 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), |
