Comment 10 for bug 2006496

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/873622
Committed: https://opendev.org/openstack/neutron/commit/7dcf8be112ed205a6c694c1f3549e08b4234d82d
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 7dcf8be112ed205a6c694c1f3549e08b4234d82d
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Feb 8 13:14:19 2023 +0100

    Improve scheduling L3/DHCP agents, missing lower binding indexes

    This patch is covering an edge case that could happen when the number
    of DHCP agents ("dhcp_agents_per_network") or L3 agents
    ("max_l3_agents_per_router") has been reduced and there are more agents
    assigned than the current number. If the user removes any agent
    assignation from a L3 router or a DHCP agent, it is possible to remove
    first the lower binding assigned registers.

    Now the method ``get_vacant_binding_index`` calculates the number of
    agents bound and the number required. If a new one is needed, the
    method returns first the lower binding indexes not used.

    Closes-Bug: #2006496

    Conflicts:
        neutron/common/_constants.py
        neutron/objects/l3agent.py

    Change-Id: I25145c088ffdca47acfcb7add02b1a4a615e4612
    (cherry picked from commit 5250598c804a38c55ff78cfb457b73d1b3cd7e07)
    (cherry picked from commit 0920f17f476ce8b398deea3e54e9f90b5251cfc9)