Using external routers and dhcp metadata together is difficult
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Darragh O'Reilly | ||
Havana |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When isolated_
Currently the dhcp agent determines that the subnet is isolated by simply checking that the subnet gateway_ip is not set.
enable_metadata = (
and not subnet.gateway_ip
and subnet.ip_version == 4)
But this creates difficulty for users who don't want to use Neutron routers, but want to use a provider network with an external router and get the metadata via the proxy in the dhcp namespace instead. You would like to set gateway_ip to the external router, but when you do that, the agent will not push out the route.
To workaround, you can push out the default route as a host route, eg, if the external router is at 10.0.0.254:
neutron subnet-create net1 10.0.0.0/24 --name sub1 \
--no-gateway \
--host-route destination=
--allocation-pool start=10.
Or you can set the gateway_ip and manually add the metadata static route to the subnet. But then you need to first determine what the dhcp IP is, or will be, and I think it can land on any of the first 3 ips of the CIDR depending on where the gateway_ip is, and if the dhcp-agent is restarted before the first instance for the network is booted.
Anyway, these workarounds are tricky and are not very obvious. It would be better if users could just do this:
neutron subnet-create net1 10.0.0.0/24 --name sub1 ---gateway_ip 10.0.0.254
This would be possible if the agent determined that the subnet was isolated by checking for the absence of a Neutron router on it, rather than just checking that it has no gateway_ip.
Changed in neutron: | |
assignee: | nobody → Darragh O'Reilly (darragh-oreilly) |
status: | New → In Progress |
description: | updated |
Changed in neutron: | |
milestone: | none → icehouse-1 |
importance: | Undecided → Medium |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | icehouse-1 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/50292
Review: https:/