neutron-server report DhcpPortInUse ERROR log

Bug #1829332 reported by yangjianfeng on 2019-05-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Medium
yangjianfeng

Bug Description

In our environment, the /var/log/neutron/server.log occasionally report the following error: http://paste.openstack.org/show/751456/

I found it is resulted by https://review.opendev.org/#/c/236983/ and https://review.opendev.org/#/c/606383/. The two patches resolved they closed bug, but I think their solutions are not perfect.
They may result in the following issues:
1. Result in neutron-server raise ERROR log
2. If we encounter the case: https://bugs.launchpad.net/neutron/+bug/1795126, the old agent may create a redundant port. Because of the neutron-dhcp-agent may create a new port after it received DhcpPortInUse exception.

So, I think we should optimize these codes.

Fix proposed to branch: master
Review: https://review.opendev.org/659523

Changed in neutron:
assignee: nobody → yangjianfeng (yangjianfeng)
status: New → In Progress
Ryan Tidwell (ryan-tidwell) wrote :

Thank you for the report, I have a few clarifying questions:

- How often are you seeing this and is there any sequence of actions you have observed that seems to cause this?
- What is the impact on the environment when you encounter this? Is DHCP able to function?
- Have you attempted any workarounds?

Changed in neutron:
importance: Undecided → Medium

Change abandoned by Yang JianFeng (<email address hidden>) on branch: master
Review: https://review.opendev.org/659524

Reviewed: https://review.opendev.org/659523
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=494b65d951dbc03f4cebb3bc14970e54ff6adb5f
Submitter: Zuul
Branch: master

commit 494b65d951dbc03f4cebb3bc14970e54ff6adb5f
Author: Yang JianFeng <email address hidden>
Date: Thu May 16 17:40:28 2019 +0800

    Optimize the code that fixes the race condition of DHCP agent.

    https://review.opendev.org/#/c/236983/
    https://review.opendev.org/#/c/606383/
    The above patchs that resolve the race condition of DHCP agent will
    result in neutron-server raise DhcpPortInUse ERROR log. And, the
    second patch may result in old dhcp agent create a redundant port.

    Closes-Bug: #1829332
    Change-Id: If7a7ac2f88ce5b0e799c1104c936735a6cc860aa

Changed in neutron:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/664247
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ee85fd74cf10d27fec6716271d42a8208f1e8694
Submitter: Zuul
Branch: stable/queens

commit ee85fd74cf10d27fec6716271d42a8208f1e8694
Author: Yang JianFeng <email address hidden>
Date: Thu May 16 17:40:28 2019 +0800

    Optimize the code that fixes the race condition of DHCP agent.

    https://review.opendev.org/#/c/236983/
    https://review.opendev.org/#/c/606383/
    The above patchs that resolve the race condition of DHCP agent will
    result in neutron-server raise DhcpPortInUse ERROR log. And, the
    second patch may result in old dhcp agent create a redundant port.

    Conflicts:
     neutron/agent/dhcp/agent.py
     neutron/api/rpc/handlers/dhcp_rpc.py

    Closes-Bug: #1829332
    Change-Id: If7a7ac2f88ce5b0e799c1104c936735a6cc860aa
    (cherry picked from commit 494b65d951dbc03f4cebb3bc14970e54ff6adb5f)

tags: added: in-stable-queens

Reviewed: https://review.opendev.org/664236
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=05804a325e57faa1581fd123041773b2dcd60778
Submitter: Zuul
Branch: stable/stein

commit 05804a325e57faa1581fd123041773b2dcd60778
Author: Yang JianFeng <email address hidden>
Date: Thu May 16 17:40:28 2019 +0800

    Optimize the code that fixes the race condition of DHCP agent.

    https://review.opendev.org/#/c/236983/
    https://review.opendev.org/#/c/606383/
    The above patchs that resolve the race condition of DHCP agent will
    result in neutron-server raise DhcpPortInUse ERROR log. And, the
    second patch may result in old dhcp agent create a redundant port.

    Closes-Bug: #1829332
    Change-Id: If7a7ac2f88ce5b0e799c1104c936735a6cc860aa
    (cherry picked from commit 494b65d951dbc03f4cebb3bc14970e54ff6adb5f)

tags: added: in-stable-stein

Reviewed: https://review.opendev.org/664242
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1146526304fa4f01e69cd0e7f9615ee0d31d86e0
Submitter: Zuul
Branch: stable/rocky

commit 1146526304fa4f01e69cd0e7f9615ee0d31d86e0
Author: Yang JianFeng <email address hidden>
Date: Thu May 16 17:40:28 2019 +0800

    Optimize the code that fixes the race condition of DHCP agent.

    https://review.opendev.org/#/c/236983/
    https://review.opendev.org/#/c/606383/
    The above patchs that resolve the race condition of DHCP agent will
    result in neutron-server raise DhcpPortInUse ERROR log. And, the
    second patch may result in old dhcp agent create a redundant port.

    Conflicts:
     neutron/api/rpc/handlers/dhcp_rpc.py

    Closes-Bug: #1829332
    Change-Id: If7a7ac2f88ce5b0e799c1104c936735a6cc860aa
    (cherry picked from commit 494b65d951dbc03f4cebb3bc14970e54ff6adb5f)

tags: added: in-stable-rocky

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

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

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

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

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

Other bug subscribers