DHCP port information incomplete during the DHCP port setup

Bug #1841636 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

This bug is related to:
- https://bugs.launchpad.net/neutron/+bug/1828755
- https://bugs.launchpad.net/neutron/+bug/1627480

BUG DESCRIPTION.
We have a deployment where, during the DHCP agent restart, some DHCP namespace ports are synchronized without any reason. This bug is reported in [1].

When the DHCP agent is restarted, the port information passed to the agent does not contain the correct "fixed_ips" parameter:
Requested DHCP port with IPs on subnets set([u'xxxxxxxxxx']) but only got IPs on subnets set([])

However, this port, used before the restart as the DHCP namespace port, is never modified and the "fixed_ips" should be the same. When this happens, the whole namespace is resync; this takes around 30 seconds just to retrieve the server information and setup the DHCP port again.

MITIGATION.
In order to mitigate (not to solve) this issue, I'll propose a patch to, when [2] happens, make a RPC call to retrieve only the DHCP port from the server DB. If the port information is correct (an updated), the method should continue avoiding the exception SubnetMismatchForPort.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1741373
[2] https://github.com/openstack/neutron/blob/4f6b8bb3e55dfa564e87d90e4c1257d0153ef141/neutron/agent/linux/dhcp.py#L1426

Tags: l3-ipam-dhcp
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/678905

tags: added: l3-ipam-dhcp
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit b0a93df47637958fc3fc172f15e8593d6e9b181a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Aug 27 09:43:26 2019 +0000

    Update DHCP port information during setup

    When setting up the DHCP agent of a network, the DHCP namespace external
    port is configured. If this port already exists and the fixed IP
    addresses are correctly configured (in the DHCP subnets range), the port
    is used as is.

    Sometimes, because of 1627480 or 1841636, the port information is not
    correctly retrieved. This patch does not solve it but mitigates the
    process of resynchronizing the network DHCP. If the stored DHCP port
    does not have the correct information, the agent calls the RPC plugin to
    retrieve from the server the DHCP port updated information, including
    the fixed IP address and the subnets.

    Change-Id: Iff40e7bba645ee12c2001d7ce735a36e0ddc81e9
    Related-Bug: #1627480
    Related-Bug: #1841636

Revision history for this message
Brian Haley (brian-haley) wrote :

Did this change fix the issue?

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Yes, this patch fixed the issue.

Changed in neutron:
status: In Progress → Fix Released
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.