Skip to content

Commit

Permalink
Use new ip addr del syntax
Browse files Browse the repository at this point in the history
Start appending the /32 suffix to the addresses when removing floating IPs.
Fixes bug 865371.

Change-Id: I77df5748ba5417b7474a90e641ecc8adc76921c2
  • Loading branch information
viraptor committed Oct 12, 2011
1 parent 56be39a commit 60b3d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nova/network/linux_net.py
Expand Up @@ -403,7 +403,7 @@ def init_host():

def bind_floating_ip(floating_ip, check_exit_code=True):
"""Bind ip to public interface."""
_execute('ip', 'addr', 'add', floating_ip,
_execute('ip', 'addr', 'add', str(floating_ip) + '/32',
'dev', FLAGS.public_interface,
run_as_root=True, check_exit_code=check_exit_code)
if FLAGS.send_arp_for_ha:
Expand All @@ -414,7 +414,7 @@ def bind_floating_ip(floating_ip, check_exit_code=True):

def unbind_floating_ip(floating_ip):
"""Unbind a public ip from public interface."""
_execute('ip', 'addr', 'del', floating_ip,
_execute('ip', 'addr', 'del', str(floating_ip) + '/32',
'dev', FLAGS.public_interface, run_as_root=True)


Expand Down

0 comments on commit 60b3d3f

Please sign in to comment.