commit 4a1c63065431c4a5f8dc40d5b8c6c5754d43c423
Author: Terry Wilson <email address hidden>
Date: Fri May 10 15:00:05 2024 -0500
Don't create an OVSDB connection per API request
Using the default ovsdbapp.backend.ovs_idl.Backend behavior which
stores the ovsdb_connection on the Backend class itself ensures
that when Octavia does the imports necessary for instantiating the
driver, that the ovsdb_connection will remain on the class even
though the instances are deleted. This will allow us to reuse the
OVSDB connection between APIs despite octavia-api knowing nothing
about it.
In addition, __del__() can called from any thread by the garbage
collector, and so it was possible that thread.join() would be
called by the thread we were in, throwing an Exception and
preventing cleanup.
Reviewed: https:/ /review. opendev. org/c/openstack /ovn-octavia- provider/ +/921383 /opendev. org/openstack/ ovn-octavia- provider/ commit/ 4a1c63065431c4a 5f8dc40d5b8c6c5 754d43c423
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2024.1
commit 4a1c63065431c4a 5f8dc40d5b8c6c5 754d43c423
Author: Terry Wilson <email address hidden>
Date: Fri May 10 15:00:05 2024 -0500
Don't create an OVSDB connection per API request
Using the default ovsdbapp. backend. ovs_idl. Backend behavior which
stores the ovsdb_connection on the Backend class itself ensures
that when Octavia does the imports necessary for instantiating the
driver, that the ovsdb_connection will remain on the class even
though the instances are deleted. This will allow us to reuse the
OVSDB connection between APIs despite octavia-api knowing nothing
about it.
In addition, __del__() can called from any thread by the garbage
collector, and so it was possible that thread.join() would be
called by the thread we were in, throwing an Exception and
preventing cleanup.
Co-authored-by: Gregory Thiemonge <email address hidden>
Co-authored-by: Ihar Hrachyshka <email address hidden>
Co-authored-by: Jakub Libosvar <email address hidden>
Closes-Bug: #2065460
Closes-Bug: #2065459
Change-Id: I4f5df34ab32e8b 33ff54f311b9b2a c00c9be1e05 b79b1ceb7f8da18 8e251cc6ef)
(cherry picked from commit 9c2274e813fe167