DHCP agent should not start metadata ns proxy with vrouter id

Bug #1703059 reported by Liping Mao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Liping Mao

Bug Description

When user create network with isolated subnet, dhcp may create metadata ns proxy with router id.

How to reproduce:
1. create a router: R1
2. create a network: Net1
3. create two subnetworks: Sub1, Sub2
4. attach Sub1 to R1. (do not attach Sub2)

if you deploy dhcp-agent and l3-agent on seperate node, you will see:
   a) dhcp-agent will start metadata ns proxy with router-uuid with port 80 (This metadata ns proxy will not work in data path)

Here is a sample, you can see the metadata_port is 80 with router_id:
neutron 237535 0.0 0.2 295864 46284 ? S Jul07 0:00 /usr/bin/python2 /bin/neutron-ns-metadata-proxy --pid_file=/var/lib/neutron/external/pids/160f2356-3bf5-4a1c-80e6-b9ef8b971047.pid --metadata_proxy_socket=/var/lib/neutron/metadata_proxy --router_id=160f2356-3bf5-4a1c-80e6-b9ef8b971047 --state_path=/var/lib/neutron --metadata_port=80 --metadata_proxy_user=995 --metadata_proxy_group=992 --debug --log-file=neutron-ns-metadata-proxy-160f2356-3bf5-4a1c-80e6-b9ef8b971047.log --log-dir=/var/log/neutron

   b) l3-agent will start metadata ns proxy with router-uuid with port 9697 (This metadata ns proxy works in data path)

if you deploy deploy dhcp-agent and l3-agent on same node, metadata ns proxy may start by dhcp or l3 agent, both process manager in dhcp agent and l3 agent will monitor this metadata ns proxy. This means if you kill this metadata ns proxy, it may be start up by dhcp agent or l3 agent, this is relay on which agent start it first. you will see the port of metadata ns proxy may be 80 or 9697. The action is unpredictable.

The problem is DHCP agent should not manage metadata ns proxy with router_id, this kind of metadata ns proxy should be managed by l3 agent.

When dhcp agent find isolated subnet, it should start metadata ns proxy with network_id, not router_id, the following code should be removed:
https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L508

Liping Mao (limao)
description: updated
Liping Mao (limao)
summary: - DHCP agent start metadata ns process with vrouter id in subnet isolated
+ DHCP agent start metadata ns process with vrouter id
summary: - DHCP agent start metadata ns process with vrouter id
+ DHCP agent should not start metadata ns process with vrouter id
Liping Mao (limao)
summary: - DHCP agent should not start metadata ns process with vrouter id
+ DHCP agent should not start metadata ns proxy with vrouter id
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → Liping Mao (limao)
status: New → In Progress
Changed in neutron:
importance: Undecided → Low
Changed in neutron:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/481785
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=13eea520b5c03010dc4b42a9dcf41b004fe40ed7
Submitter: Jenkins
Branch: master

commit 13eea520b5c03010dc4b42a9dcf41b004fe40ed7
Author: Liping Mao (limao) <email address hidden>
Date: Sat Jul 8 10:22:28 2017 +0800

    dhcp agent start md-proxy with vrouter id only when has metadata subnet

    When user create network with isolated subnet, dhcp agent will
    create md-proxy with vrouter id. This will conflict with then md-proxy
    created by l3 agent. This patch updated dhcp agent start md-proxy with
    vrouter id only when the network has metadata subnet.

    Change-Id: I3288327bf9d0cdf759a6fdf365d1289e8b7442db
    Closes-Bug: #1703059

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/501532

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

Reviewed: https://review.openstack.org/501532
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e40e3e7e94fd55e8af8b389cce73db75f3280ceb
Submitter: Jenkins
Branch: stable/pike

commit e40e3e7e94fd55e8af8b389cce73db75f3280ceb
Author: Liping Mao (limao) <email address hidden>
Date: Sat Jul 8 10:22:28 2017 +0800

    dhcp agent start md-proxy with vrouter id only when has metadata subnet

    When user create network with isolated subnet, dhcp agent will
    create md-proxy with vrouter id. This will conflict with then md-proxy
    created by l3 agent. This patch updated dhcp agent start md-proxy with
    vrouter id only when the network has metadata subnet.

    Change-Id: I3288327bf9d0cdf759a6fdf365d1289e8b7442db
    Closes-Bug: #1703059
    (cherry picked from commit 13eea520b5c03010dc4b42a9dcf41b004fe40ed7)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.1

This issue was fixed in the openstack/neutron 11.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.0.0b1

This issue was fixed in the openstack/neutron 12.0.0.0b1 development milestone.

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.