Comment 11 for bug 1969270

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/838897
Committed: https://opendev.org/openstack/neutron/commit/85055d8c65f70e390af54227ace60a788121683b
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 85055d8c65f70e390af54227ace60a788121683b
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Apr 13 23:38:04 2022 +0000

    [DHCP] Break reference chain to any Exception object when resync

    In the DHCP agent, if an exception is raised during the driver call,
    "DhcpAgent.schedule_resync" is called. Before this patch, the
    exception instance was passed instead of a string. This instance
    reference was stored in the dictionary "needs_resync_reasons" and
    used in "_periodic_resync_helper" to resync the DHCP agent
    information.

    The call to "sync_state" passed the dictionary ".keys()" method. In
    python2.7 when that was implemented, this method was creating a list
    with the dictionary keys. In python3, this method is a generator
    that holds the dictionary content.

    This patch breaks this reference chain in two points (actually only
    one is needed):
    - "sync_state" now passes a list created from the mentioned generator.
    - The dictionary "needs_resync_reasons" now stores the exception
      strings only, instead of the exception instance.

    Closes-Bug: #1969270
    Change-Id: I07e9818021283d321fc32066be7e0f8e2b81e639
    (cherry picked from commit e3b3ec930967305e5fce314c0a4cf74151ad711c)