Rerise original exception on retry
Related-Prod: PRODX-14689
Change-Id: Iecefd285e180ee9946ee6548c678e9ec66173cdf
(cherry picked from commit 28bae96f56c1936ec1afac1ef0e8cd8f96541e3f)
diff --git a/octavia_tempest_plugin/services/load_balancer/v2/base_client.py b/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
index bf08c5a..831582d 100644
--- a/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
+++ b/octavia_tempest_plugin/services/load_balancer/v2/base_client.py
@@ -60,7 +60,8 @@
retry=tenacity.retry_if_exception_type(exceptions.Conflict),
wait=tenacity.wait_incrementing(
const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
- stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+ stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+ reraise=True)
def _create_object(self, parent_id=None, return_object_only=True,
**kwargs):
"""Create an object.
@@ -221,7 +222,8 @@
retry=tenacity.retry_if_exception_type(exceptions.Conflict),
wait=tenacity.wait_incrementing(
const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
- stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+ stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+ reraise=True)
def _update_object(self, obj_id, parent_id=None, return_object_only=True,
**kwargs):
"""Update an object.
@@ -279,7 +281,8 @@
retry=tenacity.retry_if_exception_type(exceptions.Conflict),
wait=tenacity.wait_incrementing(
const.RETRY_INITIAL_DELAY, const.RETRY_BACKOFF, const.RETRY_MAX),
- stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS))
+ stop=tenacity.stop_after_attempt(const.RETRY_ATTEMPTS),
+ reraise=True)
def _delete_obj(self, obj_id, parent_id=None, ignore_errors=False,
cascade=False):
"""Delete an object.