From: Casey Bodley Date: Fri, 12 Jan 2024 16:05:48 +0000 (-0500) Subject: test/rgw: metadata sync checkpoint waits on global 'sync' status X-Git-Tag: v19.3.0~226^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5a08ba98756d2f4eeef438d89fa1ea959e62fc3;p=ceph.git 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 --- diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index c720423e9239..3f12d25f75a2 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: