neutron-lib/neutron_lib
Rodolfo Alonso Hernandez 08b8c6d33b Add the "cancellable" flag to the ``CallbacksManager`` events
The ``CallbacksManager`` class considers, by default, that the events
starting with "before_" and "precommit_" can raise an Exception
(``CallbackFailure``) in case that the callbacks associated to these
methods exit with an error.

However there are some other events (those started with "after_") that
won't generate an exception in case of error. The error will be logged
but the process will continue.

This new functionality adds the possibility of adding any kind of event
and mark is as "cancellable". The ``CallbacksManager`` instance will check
the errors returned by the callback methods and if any of them is marked
as "cancellable", the manager will raise a ``CallbackFailure`` exception,
terminating the process.

In case of being a Neutron worker, for example, the
``oslo_service.service.Services`` class will restart the process again.

Related-Bug: #2036607
Change-Id: Ie1e7be6d70cca957c1b1b6c15b402e8bc6523865
2023-09-12 04:32:26 +00:00
..
agent Rehome ovsfw constants and utils modules 2022-06-01 22:15:43 +02:00
api Fix the default value for ``hardware_offload_type`` field 2023-07-04 09:07:51 +00:00
callbacks Add the "cancellable" flag to the ``CallbacksManager`` events 2023-09-12 04:32:26 +00:00
db Merge "Removed ``HasProjectPrimaryKeyIndex`` class" 2023-07-07 20:48:22 +00:00
exceptions Add FirewallGroupPortNotSupported exception 2023-06-02 10:20:46 +08:00
hacking Switch to hacking 2.0 2020-03-17 15:31:31 +09:00
locale/zh_CN/LC_MESSAGES Imported Translations from Zanata 2018-03-01 06:47:27 +00:00
objects Rehome ``NumaAffinityPoliciesEnumField`` 2022-03-04 22:31:39 +00:00
placement Add RP_TUNNELLED and TRAIT_NETWORK_TUNNEL constants 2023-07-19 13:29:15 +00:00
plugins DPDK datapath type added 2023-05-04 17:08:36 +03:00
policy Add is_service_role property to the context class 2023-06-30 15:56:20 +02:00
services Revert "Add "network" to the EXT_PARENT_RESOURCE_MAPPING" 2023-07-21 08:19:12 +00:00
tests Add the "cancellable" flag to the ``CallbacksManager`` events 2023-09-12 04:32:26 +00:00
utils Replace deprecated import of ABCs from collections 2021-07-17 12:22:34 +09:00
__init__.py Remove library "six" 2020-01-22 13:16:45 +00:00
_i18n.py Update the documentation link for doc migration 2017-07-20 15:46:41 +00:00
constants.py Add port hardware offload extension 2023-06-21 18:01:35 +00:00
context.py Add is_service_role property to the context class 2023-06-30 15:56:20 +02:00
fixture.py [sqlalchemy-20] Use Connection.execute() instead of Engine.execute() 2023-02-23 14:57:37 +00:00
rpc.py Use new get_rpc_client API from oslo.messaging 2023-02-02 22:44:00 +01:00
version.py Setup for devref documentation 2015-12-07 18:50:07 +00:00
worker.py Remove deprecated method registry.notify 2021-09-20 09:26:07 +00:00