Bug 1276399
Summary: | possible to have a VM with 2 default gateways | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Micah Abbott <miabbott> |
Component: | cloud-init | Assignee: | Lars Kellogg-Stedman <lars> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | walters |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-16 18:29:49 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Micah Abbott
2015-10-29 15:26:32 UTC
I agree that the difference is probably NetworkManager vs. legacy init scripts. It looks as if NetworkManager is configured such that it will attempt to activate any available interfaces using DHCP. There are a couple of ways of looking at this issue. It is not unreasonable that a system -- especially one optimized for cloud environments where all networks are attached explicitly -- will try to activate any available networks automatically. One way of addressing this problem is ensuring that you do not set a default route on subnets that will not be used for outbound access: neutron subnet-create --no-gateway ... As long as only one of the networks has a gateway defined, there won't be a problem. In the case that you do need to attach two networks that both define default routes, there are a few options. In my test environment, this does not appear to cause a problem; I end up with a routing table that looks like: default via 10.0.0.1 dev eth0 proto static metric 100 default via 10.1.0.1 dev eth1 proto static metric 101 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.59 metric 100 10.1.0.0/24 dev eth1 proto kernel scope link src 10.1.0.12 metric 100 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.42.1 Note that the two default routes have different metrics, so the first will be used preferentially, and since this is the network associated with the instance's floating ip, everything works as expected. So, one option is simply to ensure that the first network attached to the instance is the one with a connection to a floating-ip network. I am running a recent download of the RHEL Atomic Host 7.1 image, which suggests you should be seeing similar behavior. Alternate solutions include fixing the network configuration via a cloud-init script, which may require providing configuration metadata via the config-drive option rather than over the network (if the routing table is preventing access to the metadata service). I do not recommend this option; I think either of the above options is preferable: - Do not define default gateways on which they are not required, or - Always make sure the first network attached is the one that will be used by connections to the floating-ip. Please let me know if this helps out. |