2013-05-13 10:27:44 |
Jesse Pretorius |
description |
Environment: Ubuntu 12.04.2 LTS, Folsom packages
When utilising nova-network on a public_interface that has no IP Address assigned on the compute node, the route defined on the interface is lost whenever the last floating IP is removed from the interface.
To replicate the issue, define the public_interface as a manual interface with the public network and default route applied as post-up commands. On ubuntu it would be in /etc/network/interfaces, something like this:
auto eth0
iface eth0 inet manual
post-up route add -net 165.233.72.0/23 eth0
post-up route add default gw 165.233.72.1 eth0
Then in /etc/nova/nova.conf there would be the line:
public_interface=eth0
When adding a floating IP to this interface, an ip address is added to the interface using 'ip addr add' by a combination of the following two files (on Ubuntu):
/usr/share/pyshared/nova/network/l3.py
/usr/share/pyshared/nova/network/linux_net.py
When the floating IP is removed from the interface, the same two files process the removal using 'ip addr del' and in doing so also result in the loss of the network and default routes. This can be replicated by simply adding an ip address on that interface using 'ip addr add', then 'ip addr del' for the same IP - the issuing 'route -n' or 'ip route' to confirm the route's demise.
In our environment where we are not allocating a public IP address to the compute host this results in the loss of connectivity for any instances with a floating IP as the default route is lost. |
Environment: Ubuntu 12.04.2 LTS, Folsom packages
When utilising nova-network on a public_interface that has no IP Address assigned on the compute node, the route defined on the interface is lost whenever the last floating IP is removed from the interface.
To replicate the issue, define the public_interface as a manual interface with the public network and default route applied as post-up commands. On ubuntu it would be in /etc/network/interfaces, something like this:
auto eth0
iface eth0 inet manual
post-up route add -net xxx.yyy.zzz.0/23 eth0
post-up route add default gw xxx.yyy.zzz.1 eth0
Then in /etc/nova/nova.conf there would be the line:
public_interface=eth0
When adding a floating IP to this interface, an ip address is added to the interface using 'ip addr add' by a combination of the following two files (on Ubuntu):
/usr/share/pyshared/nova/network/l3.py
/usr/share/pyshared/nova/network/linux_net.py
When the floating IP is removed from the interface, the same two files process the removal using 'ip addr del' and in doing so also result in the loss of the network and default routes. This can be replicated by simply adding an ip address on that interface using 'ip addr add', then 'ip addr del' for the same IP - the issuing 'route -n' or 'ip route' to confirm the route's demise.
In our environment where we are not allocating a public IP address to the compute host this results in the loss of connectivity for any instances with a floating IP as the default route is lost. |
|