Skip to content

Commit 20ba447

Browse files
ralonsohvoyageur
authored andcommitted
Make OVNMechanismDriver.post_fork_initialize callback cancellable
If the callback method ``OVNMechanismDriver.post_fork_initialize`` fails, the callback manager must raise an exception and finish the process. If that happens in a Neutron worker, the ``oslo_service.service.Services`` class will restart the process. NOTE: update n-lib version The neutron-lib version is bumped to 3.4.2. It contains [1], needed for this patch. [1]https://review.opendev.org/c/openstack/neutron-lib/+/903335 Conflicts: requirements.txt Partial-Bug: #2036607 Change-Id: I2aca9a522bda2d69962369748b70fa9270fbe245 (cherry picked from commit bb1114c)
1 parent 94cf7a4 commit 20ba447

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ def subscribe(self):
244244
events.BEFORE_SPAWN)
245245
registry.subscribe(self.post_fork_initialize,
246246
resources.PROCESS,
247-
events.AFTER_INIT)
247+
events.AFTER_INIT,
248+
cancellable=True)
248249
registry.subscribe(self._add_segment_host_mapping_for_segment,
249250
resources.SEGMENT,
250251
events.AFTER_CREATE)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Jinja2>=2.10 # BSD License (3 clause)
2020
keystonemiddleware>=5.1.0 # Apache-2.0
2121
netaddr>=0.7.18 # BSD
2222
netifaces>=0.10.4 # MIT
23-
neutron-lib>=3.4.0 # Apache-2.0
23+
neutron-lib>=3.4.2 # Apache-2.0
2424
python-neutronclient>=7.8.0 # Apache-2.0
2525
tenacity>=6.0.0 # Apache-2.0
2626
SQLAlchemy>=1.4.23 # MIT

0 commit comments

Comments
 (0)