From: Shilpa Jagannath Date: Fri, 24 Jul 2026 20:53:46 +0000 (+0000) Subject: qa/multisite: fix flaky test_bucket_sync_disable X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=405b99064fd9f676b911f421e638010295a1e1e2;p=ceph.git qa/multisite: fix flaky test_bucket_sync_disable rely on 'bucket sync status' instead of looking up sync-status object. it reports that there are no sync sources once the bucket's disabled flag has propagated. also add a meta checkpoint after disabling. Signed-off-by: Shilpa Jagannath --- diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index 02c088e55461..4bf7ce799c12 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -506,14 +506,29 @@ def disable_bucket_sync(zone, bucket_name): cmd = ['bucket', 'sync', 'disable', '--bucket', bucket_name] + zone.zone_args() zone.cluster.admin(cmd) -def check_buckets_sync_status_obj_not_exist(zone, buckets): +def check_buckets_sync_disabled(zonegroup, buckets): + """ verify that no zone is actively (full or incremental) syncing the + given buckets from any other zone, ie that bucket sync is disabled. + this polls because it can take a few seconds for the disabled state to + propagate via metadata sync """ + active_states = ('full-sync', 'incremental-sync') + zones = zonegroup.zones for _ in range(config.checkpoint_retries): - cmd = ['log', 'list'] + zone.zone_arg() - log_list, ret = zone.cluster.admin(cmd, check_retcode=False, read_only=True) - for bucket in buckets: - if log_list.find(':'+bucket+":") >= 0: + still_syncing = False + for zone in zones: + for source_zone in zones: + if source_zone == zone: + continue + for bucket_name in buckets: + state = get_bucket_sync_state(zone, source_zone, bucket_name) + if state in active_states: + still_syncing = True + break + if still_syncing: + break + if still_syncing: break - else: + if not still_syncing: return time.sleep(config.checkpoint_delay) assert False @@ -1682,9 +1697,9 @@ def test_bucket_sync_disable(): for bucket_name in buckets: disable_bucket_sync(realm.meta_master_zone(), bucket_name) + zonegroup_meta_checkpoint(zonegroup) - for zone in zonegroup.zones: - check_buckets_sync_status_obj_not_exist(zone, buckets) + check_buckets_sync_disabled(zonegroup, buckets) zonegroup_data_checkpoint(zonegroup_conns)