Merge lp:~vishvananda/nova/lp710959 into lp:~hudson-openstack/nova/trunk
Status: | Merged |
---|---|
Approved by: | Devin Carlen |
Approved revision: | 651 |
Merged at revision: | 655 |
Proposed branch: | lp:~vishvananda/nova/lp710959 |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
95 lines (+57/-11) 1 file modified
nova/network/linux_net.py (+57/-11) |
To merge this branch: | bzr merge lp:~vishvananda/nova/lp710959 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Devin Carlen (community) | Approve | ||
Jay Pipes (community) | Approve | ||
Thierry Carrez (community) | Abstain | ||
Review via email: mp+48341@code.launchpad.net |
Commit message
Automates the setup for FlatDHCP regardless of whether the interface has an ip address.
FlatDHCP only has worked until now if the underlying interface that you bridge into has no ip address. This branch will do the necessary setup to allow it to work by:
* Creating a bridge with the private address for dhcp
* Moving any existing ips from the interface onto the bridge
* Adding the interface to the bridge
* Recreating the default route if it was deleted by moving the interface
It will additionally add a route to compute hosts for bridges that it adds to the compute hosts. This seems to be necessary in some cases where the default route uses a different interface.
Description of the change
Automates the setup for FlatDHCP regardless of whether the interface has an ip address.
FlatDHCP only has worked until now if the underlying interface that you bridge into has no ip address. This branch will do the necessary setup to allow it to work by:
* Creating a bridge with the private address for dhcp
* Moving any existing ips from the interface onto the bridge
* Adding the interface to the bridge
* Recreating the default route if it was deleted by moving the interface
It will additionally add a route to compute hosts for bridges that it adds to the compute hosts. This seems to be necessary in some cases where the default route uses a different interface.
This is some pretty heavy-handed networking setup, so it only does this if --flat_interface is set in flags.
Important notes:
* route needs to be added to sudoers in the packaging when this branch is merged
* it is using text output from route and ip, so it should be verified that this works in internationalized environments.
* I couldn't verify whether the changes impacted IPv6. Specifically the following line:
206 if(FLAGS.use_ipv6):
207 _execute("sudo ip -f inet6 addr change %s dev %s" %
208 (net_attrs[
I'm not sure if this can be run more than once without throwing an error.
* It should be verified that adding the route on the compute host doesn't create any weird issues with vlan mode on multiple machines. I don't see any reason why it would, but I haven't been able to test every configuration.
Seems like a fairly risky patch to include in Bexar, no? Vishy, can we get a test case that verifies the bug fix, or is that not possible because of the faked out networking components?