neutron/neutron/agent/dhcp
Rodolfo Alonso Hernandez e3b3ec9309 [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
2022-04-14 08:16:47 +00:00
..
__init__.py DHCP agent restructuring 2015-01-17 01:03:09 -08:00
agent.py [DHCP] Break reference chain to any Exception object when resync 2022-04-14 08:16:47 +00:00