From e68c902fc868f6631b2c447c2a493b98a1e13887 Mon Sep 17 00:00:00 2001 From: Ionut Balutoiu Date: Wed, 24 Apr 2024 19:20:33 +0300 Subject: [PATCH] CephRGWTest: Wait for sites to be syncronised before recovery scenario If `self.promote_rgw_to_primary(self.primary_rgw_app)` is executed before sites are syncronised, the sites will not be syncronised after. Signed-off-by: Ionut Balutoiu --- zaza/openstack/charm_tests/ceph/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 5c047c7..546aa56 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -1167,6 +1167,10 @@ class CephRGWTest(test_utils.BaseCharmTest): 'Body' ].read().decode('UTF-8') + # Wait for Sites to be syncronised. + self.wait_for_status(self.primary_rgw_app, is_primary=False) + self.wait_for_status(self.secondary_rgw_app, is_primary=True) + # Recovery scenario, reset ceph-rgw as primary. self.promote_rgw_to_primary(self.primary_rgw_app) self.wait_for_status(self.primary_rgw_app, is_primary=True)