Subnet without default gateway breaks DHCP agent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
networking-calico |
In Progress
|
Undecided
|
Andriy Popovych |
Bug Description
I am seeing this on Kilo, but based on the conversation from slack I expect to see the breakage post-Kilo also.
We have a situation where we have some instances that have 2 NICs. One is a public internet connection where we serve a default route via DHCP.
The second NIC is a private subnet on 10.0.0.0/8 where we cannot serve a default route, otherwise it will break public internet connectivity inside the instance. We use an "extra route" in Neutron to serve the appropriate routes we want the instances to have for the private subnets. Ie. Destination 10.0.0.0/8 : Next hop 10.13.64.1
Neutron has support for removing the default route from a subnet, however this breaks Calico in that Calico expects to bind the gateway address to the ns-* interface for the subnet so dnsmasq can receive DHCP requests for the subnet. When you do not specify a gateway on a Neutron subnet, neutron-dhcp-agent fails to start:
2016-02-03 09:48:14.656 4137648 INFO neutron.
2016-02-03 09:48:14.785 4137648 ERROR neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.785 4137648 TRACE neutron.
2016-02-03 09:48:14.786 4137648 INFO neutron.
Changed in networking-calico: | |
assignee: | nobody → Aleksey Kasatkin (alekseyk-ru) |
Changed in networking-calico: | |
status: | New → Confirmed |
Changed in networking-calico: | |
status: | In Progress → Confirmed |
Changed in networking-calico: | |
assignee: | Aleksey Kasatkin (alekseyk-ru) → Alexander Saprykin (cutwater) |
Changed in networking-calico: | |
status: | Confirmed → In Progress |
Changed in networking-calico: | |
assignee: | Alexander Saprykin (cutwater) → Andriy Popovych (popovych-andrey) |
I'm looking to this on Newton and I see similar issue. I don't se such traces but problem remains the same: subnet without a gateway cannot be used with dhcp.
Looks like it is by design:
def use_gateway_ ips(self) :
...
return True
But you can use host-route of subnet if it suits your needs.
I suppose, support for subnet without gateway can be implemented but it's not just about changing of use_gateway_ips to False.