From d5a08ba98756d2f4eeef438d89fa1ea959e62fc3 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 12 Jan 2024 11:05:48 -0500 Subject: [PATCH] test/rgw: metadata sync checkpoint waits on global 'sync' status in testing, i was seeing meta sync checkpoints finish even though sync hadn't started yet: ``` rgw_multi.tests: DEBUG: current meta sync status={ "sync_status": { "info": { "status": "building-full-sync-maps", ``` wait for the global status to reach "sync" before starting to compare period epochs or sync markers Signed-off-by: Casey Bodley --- src/test/rgw/rgw_multi/tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index c720423e92398..3f12d25f75a27 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -131,7 +131,7 @@ def parse_meta_sync_status(meta_sync_status_json): else: markers[i] = sync_markers[i]['val']['marker'] - return period, realm_epoch, num_shards, markers + return global_sync_status, period, realm_epoch, num_shards, markers def meta_sync_status(zone): for _ in range(config.checkpoint_retries): @@ -182,8 +182,10 @@ def zone_meta_checkpoint(zone, meta_master_zone = None, master_status = None): log.info('starting meta checkpoint for zone=%s', zone.name) for _ in range(config.checkpoint_retries): - period, realm_epoch, num_shards, sync_status = meta_sync_status(zone) - if realm_epoch < current_realm_epoch: + global_status, period, realm_epoch, num_shards, sync_status = meta_sync_status(zone) + if global_status != 'sync': + log.warning('zone %s has not started sync yet, state=%s', zone.name, global_status) + elif realm_epoch < current_realm_epoch: log.warning('zone %s is syncing realm epoch=%d, behind current realm epoch=%d', zone.name, realm_epoch, current_realm_epoch) else: -- 2.39.5