In case of DB outages when a flow is running, an exception is caught and
the flow is reverted. In most of the flows, the revert function of the
first task's (the last to be reverted) unlocks the load balancer by
setting its provisioning status (to ERROR or ACTIVE, depending on the
flow), but it fails if the DB is not reachable, leaving the LB in
a PENDING_* state.
This commit adds tenacity.retry to those functions, Octavia retries to
set the status during ~2h45 (2000 attempts, 1 sec initial delay, 5 sec
max delay).
Note: stable/2023.1 and older, the patch also includes modifications for
v1/tasks/lifecycle_tasks.py
Reviewed: https:/ /review. opendev. org/c/openstack /octavia/ +/897779 /opendev. org/openstack/ octavia/ commit/ 5a411a68558b8e8 1552678d79b876e 7143025f80
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit 5a411a68558b8e8 1552678d79b876e 7143025f80
Author: Gregory Thiemonge <email address hidden>
Date: Mon Sep 25 07:48:01 2023 -0400
Retry to set loadbalancer prov status on failures
In case of DB outages when a flow is running, an exception is caught and
the flow is reverted. In most of the flows, the revert function of the
first task's (the last to be reverted) unlocks the load balancer by
setting its provisioning status (to ERROR or ACTIVE, depending on the
flow), but it fails if the DB is not reachable, leaving the LB in
a PENDING_* state.
This commit adds tenacity.retry to those functions, Octavia retries to
set the status during ~2h45 (2000 attempts, 1 sec initial delay, 5 sec
max delay).
Note: stable/2023.1 and older, the patch also includes modifications for tasks/lifecycle _tasks. py
v1/
Conflicts:
octavia/ common/ config. py
octavia/ tests/unit/ controller/ worker/ test_task_ utils.py
octavia/ controller/ worker/ v1/tasks/ lifecycle_ tasks.py
Closes-Bug: #2036952 dc24116ea0fa27e 3a593044146 5b8e997fcf88779 a12d1ae130) 88c7629e9ba2cf0 09b2a6b033) a7861a0ab1d2847 159f483577) 4dd9d3a30910d67 fed7b5906e)
Change-Id: I458dd6d6f5383e
(cherry picked from commit be9149333278636
(cherry picked from commit 96782e2c543bfb4
(cherry picked from commit 57833dbdad964f8
(cherry picked from commit 27060603db697c6