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.

The neutron-lib version is bumped to 3.9.0. It contains [1], needed
for this patch.

[1]https://review.opendev.org/c/openstack/neutron-lib/+/895940

Partial-Bug: #2036607
Change-Id: I2aca9a522bda2d69962369748b70fa9270fbe245
This commit is contained in:
Rodolfo Alonso Hernandez 2023-09-11 17:26:56 +00:00
parent 119c3ba85c
commit bb1114c8b1
2 changed files with 3 additions and 2 deletions

View File

@ -248,7 +248,8 @@ class OVNMechanismDriver(api.MechanismDriver):
events.BEFORE_SPAWN)
registry.subscribe(self.post_fork_initialize,
resources.PROCESS,
events.AFTER_INIT)
events.AFTER_INIT,
cancellable=True)
registry.subscribe(self._add_segment_host_mapping_for_segment,
resources.SEGMENT,
events.AFTER_CREATE)

View File

@ -20,7 +20,7 @@ Jinja2>=2.10 # BSD License (3 clause)
keystonemiddleware>=5.1.0 # Apache-2.0
netaddr>=0.7.18 # BSD
netifaces>=0.10.4 # MIT
neutron-lib>=3.8.0 # Apache-2.0
neutron-lib>=3.9.0 # Apache-2.0
python-neutronclient>=7.8.0 # Apache-2.0
tenacity>=6.0.0 # Apache-2.0
SQLAlchemy>=1.4.23 # MIT