From d22a5cde164f193ae757aa15289d373feea72d74 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 3 Sep 2020 13:29:02 -0400 Subject: [PATCH] test/rgw: add meta checkpoints to multisite tests that rely on entrypoint the bucket checkpoints rely on the existence of the bucket's entrypoint, which only syncs via metadata sync. add meta checkpoints before any bucket checkpoints to fix spurious failures like this: > radosgw-admin --log-to-stderr --format json -n client.0 --cluster c1 bucket sync checkpoint --bucket fievzp-46 --source-zone a1 --retry-delay-ms 5000 --timeout-sec 300 --rgw-zone a2 --rgw-zonegroup a --rgw-realm test-realm --cluster c1 --debug-rgw 1 --debug-ms 0 2020-09-03T16:24:53.986 INFO:teuthology.orchestra.run.smithi055.stderr:ignoring --setuser ceph since I am not root 2020-09-03T16:24:53.987 INFO:teuthology.orchestra.run.smithi055.stderr:ignoring --setgroup ceph since I am not root 2020-09-03T16:24:54.178 INFO:teuthology.orchestra.run.smithi055.stderr:could not get bucket info for bucket=fievzp-46 2020-09-03T16:24:54.211 DEBUG:teuthology.orchestra.run:got remote process result: 2 2020-09-03T16:24:54.213 INFO:tasks.rgw_multisite_tests:tasks.rgw_multi.tests.test_bucket_sync_enable_right_after_disable ... FAIL Signed-off-by: Casey Bodley --- src/test/rgw/rgw_multi/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index 901dd6a14b08d..ae45714cd6cb9 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -948,7 +948,8 @@ def test_datalog_autotrim(): k = new_key(zone, bucket.name, 'key') k.set_contents_from_string('body') - # wait for data sync to catch up + # wait for metadata and data sync to catch up + zonegroup_meta_checkpoint(zonegroup) zonegroup_data_checkpoint(zonegroup_conns) # trim each datalog @@ -1102,6 +1103,7 @@ def test_bucket_sync_disable(): zonegroup = realm.master_zonegroup() zonegroup_conns = ZonegroupConns(zonegroup) buckets, zone_bucket = create_bucket_per_zone(zonegroup_conns) + zonegroup_meta_checkpoint(zonegroup) for bucket_name in buckets: disable_bucket_sync(realm.meta_master_zone(), bucket_name) @@ -1124,6 +1126,8 @@ def test_bucket_sync_enable_right_after_disable(): k = new_key(zone, bucket.name, objname) k.set_contents_from_string(content) + zonegroup_meta_checkpoint(zonegroup) + for bucket_name in buckets: zonegroup_bucket_checkpoint(zonegroup_conns, bucket_name) -- 2.39.5