octavia/octavia/tests/unit
Gregory Thiemonge 1ad32d7cae Fix LB set in ERROR too early in the revert flow
When an error occurs in a flow, the provisioning status of the load
balancer should be set to ERROR in the revert method of the first task
of the flow. This update acts as an unlock of the LB object and cannot
occur in any other revert method because the API might consider the LB
as mutable before finishing a task/flow.

Remove all occurrences of mark_loadbalancer_prov_status_error calls in
revert method of tasks that are not specifically designed for unlocking
the load balancers. Add a LoadBalancerToErrorOnRevertTask task in the
amphora failover flow to prevent a LB to be in an immutable state.

Story 2009651
Task 43810
Story 2009652
Task 43811

Note for stable/train: the code of the amphorav2 is not updated in this
backport, the source files exist in train but the feature was added
ussuri. Backporting this patch creates many merge conflicts and doesn't
provide anything for train users.

Conflicts:
	octavia/controller/worker/v1/tasks/database_tasks.py
	octavia/controller/worker/v2/flows/amphora_flows.py
	octavia/controller/worker/v2/tasks/amphora_driver_tasks.py
	octavia/controller/worker/v2/tasks/database_tasks.py
	octavia/tests/unit/controller/worker/v2/flows/test_amphora_flows.py
	octavia/tests/unit/controller/worker/v2/tasks/test_amphora_driver_tasks.py
	octavia/tests/unit/controller/worker/v2/tasks/test_database_tasks.py

Change-Id: I48b0f5a773209b1c1b056d71c0da05d6fd82ca73
(cherry picked from commit 4b8b198fec)
(cherry picked from commit 4039d35ce2)
(cherry picked from commit 844f1348ea)
(cherry picked from commit cf2a8bdf88)
(cherry picked from commit 95690e251d)
2021-11-16 15:06:31 +01:00
..
amphorae Fix weighted round-robin about UDP listener 2021-04-13 00:11:41 +08:00
api Fix provider driver quota handling 2021-03-15 15:20:53 +01:00
certificates Improve the error message for bad pkcs12 bundles 2019-09-20 08:26:58 -07:00
cmd Fix house keeping graceful shutdown 2020-01-31 14:00:15 +00:00
common Fix invalid/deleted members in haproxy config file 2021-05-25 15:18:13 +00:00
compute Refactor the failover flows 2020-07-09 10:59:04 +00:00
controller Fix LB set in ERROR too early in the revert flow 2021-11-16 15:06:31 +01:00
db Add license for empty __init__.py 2018-03-14 07:02:56 +09:00
network Fix duplicate SG creation for listener peer port 2021-09-15 09:57:12 +05:30
volume Support create amphora instance from volume based. 2019-09-10 22:21:42 +00:00
__init__.py Add license for empty __init__.py 2018-03-14 07:02:56 +09:00
base.py Fix oslo messaging connection leakage 2019-02-18 15:28:22 -08:00
test_hacking.py Update hacking version to latest 2019-05-14 17:38:58 -07:00
test_opts.py Updates Octavia to support octavia-lib 2019-03-07 14:40:22 +01:00
test_version.py Updates Octavia to support octavia-lib 2019-03-07 14:40:22 +01:00