neutron/neutron/tests/unit/callbacks
Kevin Benton 143b19c8d5 Separate exception class for retriables in callbacks
There are various places where we emit a callback to allow
subscribers to do validation or additional bookkeeping during
the various life-cycle events of objects. However, a subscriber
can encounter a DB Deadlock, StaleDataError or other retriable
error that just needs the transaction to be restarted. In the
rest of the Neutron code these exceptions bubble up to the API
layer where the whole request is restarted. However, the exception
catching for the callbacks in various places was preventing these
errors from being retried because they were lost in conversion.

This patch has the callback manager convert retriable exceptions
into RetryRequest exceptions that will not be caught by handlers
of CallbackError so by default it will bubble up to the API layer
and be retried. 'notify' callers can avoid this behavior by
additionally catching RetryRequest.

Closes-Bug: #1590316
Change-Id: I6732c60f89de4318b5f56327c5bc966bd250baae
2016-06-22 23:03:09 +00:00
..
__init__.py Add callbacks-based system to Neutron 2015-02-25 06:11:59 -08:00
test_manager.py Separate exception class for retriables in callbacks 2016-06-22 23:03:09 +00:00