Lock deployment of LBs

We have found issues with the following tests because they create the
same resources (ovn-provider LBs, listeners, pool, members) and they
could run in parallel in different pytest workers:
OctaviaOVNProviderTrafficTest::test_source_ip_port_traffic
StatelessSecurityGroupInstanceTest::test_sg_and_loadbalancer_together

With this patch, the functions that deploy LBs are locked so that they
cannot run on several workers simultaneously.

Change-Id: I1ba9fceb09d92f75d729a89dc7493e549f7175a8
This commit is contained in:
Eduardo Olivares 2024-11-04 17:49:18 +01:00
parent 89e278381f
commit 720c73b0a5

View File

@ -147,6 +147,7 @@ def deploy_ipv4_lb(provider: str,
return lb, listener, pool
@tobiko.interworker_synched('deploy_ipv4_amphora_lb')
def deploy_ipv4_amphora_lb(protocol: str = _constants.PROTOCOL_HTTP,
protocol_port: int = 80,
lb_algorithm: str = (
@ -176,6 +177,7 @@ def deploy_ipv4_amphora_lb(protocol: str = _constants.PROTOCOL_HTTP,
servers_stacks=servers_stacks)
@tobiko.interworker_synched('deploy_ipv4_ovn_lb')
def deploy_ipv4_ovn_lb(protocol: str = _constants.PROTOCOL_TCP,
protocol_port: int = 80,
lb_algorithm: str = (