DHCP port status not active until agent restart

Bug #1588906 reported by Richard Theis on 2016-06-03
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Wishlist
Hong Hui Xiao

Bug Description

Recreate Step:
1) Deploy DevStack cloud environment with neutron ML2 OVS.
2) Create a network and subnet with DHCP enabled.
3) Check the DHCP port status which will be DOWN or BUILD.
4) Restart the DHCP agent.
5) Check the DHCP port status which will now be ACTIVE.

I've been able to recreate this problem with ML2 OVN as well. It doesn't impact OVN core plugin. It appears that the DHCP provisioning block is not being completed like it once was.

Changed in neutron:
importance: Undecided → Low
importance: Low → Wishlist
Richard Theis (rtheis) wrote :

I think this is a regression and should have a higher importance.

Hong Hui Xiao (xiaohhui) wrote :

I agree with Richard this should have higher importance. Although it doesn't hurt the functionality, it is a regression issue which didn't exist.

I can reproduce it in my local env. I think the root cause is that the cache in dhcp agent will not have the network when the dhcp port is ready at [1], so the neutron server can't receive the signal that the port is ready, so the port status is not updated.

I will look into it for a fix.

[1] https://github.com/openstack/neutron/blob/036e0f10c60e3fa6cbb8399013f8de9579fcaa5b/neutron/agent/dhcp/agent.py#L388

Changed in neutron:
status: New → Confirmed
assignee: nobody → Hong Hui Xiao (xiaohhui)
Richard Theis (rtheis) wrote :

Thanks for working on this bug Hong Hui.

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

Changed in neutron:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/327062
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5b0ea0320236d05bc3af0cb338e03f3c3cde040a
Submitter: Jenkins
Branch: master

commit 5b0ea0320236d05bc3af0cb338e03f3c3cde040a
Author: Hong Hui Xiao <email address hidden>
Date: Wed Jun 8 12:18:53 2016 +0000

    Mark port as ready after enabling dhcp at agent

    When subnet is created and network is scheduled to dhcp agent, the
    dhcp agent will request neutron server to create dhcp port.

    Neutron server will create and mark port as BUILD and wait for the
    ready signal from dhcp agent.

    dhcp agent will create 'real' dhcp port after getting response from
    neutron server. But after that, dhcp agent will not tell neutron server
    that the dhcp port is ready. So, the reported bug can be observed.

    If ports are created before dhcp is enabled for network, dhcp agent will
    not mark ports as 'ready' as there is no network cache. This patch also
    marks all ports in network as ready, in case that happens.

    Change-Id: I363d8727f7ef6e6e08be4b0022c6464d51692b85
    Closes-bug: #1588906

Changed in neutron:
status: In Progress → Fix Released

This issue was fixed in the openstack/neutron 9.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers