dhcp-agent network namespace does not have a default route, can't use upstream dns

Bug #1181378 reported by Trevor Adams
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Carl Baldwin
Grizzly
Fix Released
Medium
Aaron Rosen

Bug Description

The network namespace that dnsmasq runs in does not have a default route on creation (to the router for that network) and as such trying to use an upstream nameserver fails.

root@somehost# for i in $(ip netns | grep dhcp); do ip netns exec $i route -n; done
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.137.0 0.0.0.0 255.255.255.0 U 0 0 0 tap1a7c6129-07
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.224.0 0.0.0.0 255.255.255.0 U 0 0 0 tap43bd32a8-82
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.225.0 0.0.0.0 255.255.255.0 U 0 0 0 tap01947148-b2
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.129.1 0.0.0.0 UG 0 0 0 tapb4f816ac-a4
10.0.129.0 0.0.0.0 255.255.255.0 U 0 0 0 tapb4f816ac-a4
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 tapb5919ca3-bc

I have added the default route on only 1 of the namespaces, the 10.0.129.0/24 one but all others do not have them and can therefore not resolve their upstream servers.

Changed in quantum:
status: New → Confirmed
milestone: none → havana-2
importance: Undecided → Medium
tags: added: l3-ipam-dhcp
tags: added: low-hanging-fruit
Jiajun Liu (ljjjustin)
Changed in quantum:
assignee: nobody → Jiajun Liu (ljjjustin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/31533

Changed in quantum:
assignee: Jiajun Liu (ljjjustin) → Carl Baldwin (carl-baldwin)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/31533
Committed: http://github.com/openstack/quantum/commit/5dd0cf15463e181b92c8809c2dcc7603bb156a0e
Submitter: Jenkins
Branch: master

commit 5dd0cf15463e181b92c8809c2dcc7603bb156a0e
Author: Carl Baldwin <email address hidden>
Date: Fri May 31 20:44:14 2013 +0000

    Adds default route to DHCP namespace for upstream name resolution.

    Any time the DHCP server is updated this code will maintain a default
    route in the DHCP namespace using the gateway_ip attribute of the
    first DHCP-enabled IPV4 subnet in the list of subnets where gateway_ip
    is not None. This strategy uses the same gateway ip that the DHCP
    server hands to the VMs on the network.

    Change-Id: I0807550a848e1b610c7775d215643ad9c83629ed
    Fixes: Bug #1181378

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Jacob Godin (jacobgodin) wrote :

Could this be back-ported into Grizzly as well?

Revision history for this message
Kevin Bringard (kbringard) wrote :

+1 for backport to grizzly

Revision history for this message
John Dewey (retr0h) wrote :

I agree with @Jacob. We see this exact problem in Grizzly and would love it back ported.

Revision history for this message
Alan Meadows (alan-meadows) wrote :

Backport would be very helpful.

tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/42247

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/grizzly)

Reviewed: https://review.openstack.org/42247
Committed: http://github.com/openstack/neutron/commit/a150dc668925ddccc2d4a8fa3001a1ba3bf19c36
Submitter: Jenkins
Branch: stable/grizzly

commit a150dc668925ddccc2d4a8fa3001a1ba3bf19c36
Author: Carl Baldwin <email address hidden>
Date: Fri May 31 20:44:14 2013 +0000

    Adds default route to DHCP namespace for upstream name resolution.

    Any time the DHCP server is updated this code will maintain a default
    route in the DHCP namespace using the gateway_ip attribute of the
    first DHCP-enabled IPV4 subnet in the list of subnets where gateway_ip
    is not None. This strategy uses the same gateway ip that the DHCP
    server hands to the VMs on the network.

    Fixes: Bug #1181378

    Conflicts:

     quantum/agent/dhcp_agent.py

    Change-Id: I0807550a848e1b610c7775d215643ad9c83629ed
    (cherry picked from commit 5dd0cf15463e181b92c8809c2dcc7603bb156a0e)

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-2 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.