]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/rgw: metadata sync checkpoint waits on global 'sync' status
authorCasey Bodley <cbodley@redhat.com>
Fri, 12 Jan 2024 16:05:48 +0000 (11:05 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 12 Jan 2024 16:05:52 +0000 (11:05 -0500)
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 <cbodley@redhat.com>
src/test/rgw/rgw_multi/tests.py

index c720423e92398134a95799da5060fea565e13da1..3f12d25f75a275ca58d9f766e7cacc5e45d24072 100644 (file)
@@ -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: