From 99167326cec2aa1378c77ac1379fd2a81a227ab1 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Wed, 10 Apr 2024 11:50:12 +0200 Subject: [PATCH] Fix race in setting up certs Closes bug #2060785 --- zaza/openstack/charm_tests/ceph/tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 46911c07c..9e6f327b1 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1264,7 +1264,13 @@ def test_005_virtual_hosted_bucket(self): endpoint_url=primary_endpoint, aws_access_key_id=access_key, aws_secret_access_key=secret_key) - primary_client.Bucket(container_name).create() + # We may not have certs for the pub hostname yet, so retry a few times. + for attempt in tenacity.Retrying( + stop=tenacity.stop_after_attempt(10), + wait=tenacity.wait_fixed(4), + ): + with attempt: + primary_client.Bucket(container_name).create() primary_object_one = primary_client.Object( container_name, obj_name