From b9af2588b8fe98d293bac222ce26104b2119ff2a Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Wed, 20 Mar 2024 11:47:32 +0100 Subject: [PATCH] Lock external network stack creation between workers In order to avoid concurrency issues when the ExternalNetworkStackFixture stack or any of its child classes (RouterStackFixture) are created, the interworker_synched decorator is added to its setup_fixture method. Change-Id: I94a2e86838020b6ca9faf77b9f5fd4f2f45b9167 --- tobiko/openstack/stacks/_neutron.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tobiko/openstack/stacks/_neutron.py b/tobiko/openstack/stacks/_neutron.py index a226803b0..dd019233c 100644 --- a/tobiko/openstack/stacks/_neutron.py +++ b/tobiko/openstack/stacks/_neutron.py @@ -41,6 +41,10 @@ class ExternalNetworkStackFixture(heat.HeatStackFixture): template = _hot.heat_template_file('neutron/external_network.yaml') + @tobiko.interworker_synched('create_external_network_stack') + def setup_stack(self): + super().setup_stack() + @property def external_name(self) -> typing.Optional[str]: return tobiko.tobiko_config().neutron.external_network