From 720c73b0a55e327b4995e9b6b77bf210e2fdabff Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Mon, 4 Nov 2024 17:49:18 +0100 Subject: [PATCH] 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 --- tobiko/openstack/octavia/_deployers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tobiko/openstack/octavia/_deployers.py b/tobiko/openstack/octavia/_deployers.py index cd4bf4da1..be5945e6a 100644 --- a/tobiko/openstack/octavia/_deployers.py +++ b/tobiko/openstack/octavia/_deployers.py @@ -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 = (