From 48144af9cc62a1d3ccbc160b503493079e0eb348 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 23 Jul 2020 18:35:04 -0400 Subject: [PATCH] test/rgw: tests use 'radosgw-admin bucket sync checkpoint' Signed-off-by: Casey Bodley --- src/test/rgw/rgw_multi/tests.py | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index 677aec4d681..901dd6a14b0 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -370,23 +370,13 @@ def zone_bucket_checkpoint(target_zone, source_zone, bucket_name): if not target_zone.syncs_from(source_zone.name): return - log_status = bucket_source_log_status(source_zone, bucket_name) - log.info('starting bucket checkpoint for target_zone=%s source_zone=%s bucket=%s', target_zone.name, source_zone.name, bucket_name) - - for _ in range(config.checkpoint_retries): - sync_status = bucket_sync_status(target_zone, source_zone, bucket_name) - - log.debug('log_status=%s', log_status) - log.debug('sync_status=%s', sync_status) - - if compare_bucket_status(target_zone, source_zone, bucket_name, log_status, sync_status): - log.info('finished bucket checkpoint for target_zone=%s source_zone=%s bucket=%s', target_zone.name, source_zone.name, bucket_name) - return - - time.sleep(config.checkpoint_delay) - - assert False, 'failed bucket checkpoint for target_zone=%s source_zone=%s bucket=%s' % \ - (target_zone.name, source_zone.name, bucket_name) + cmd = ['bucket', 'sync', 'checkpoint'] + cmd += ['--bucket', bucket_name, '--source-zone', source_zone.name] + retry_delay_ms = config.checkpoint_delay * 1000 + timeout_sec = config.checkpoint_retries * config.checkpoint_delay + cmd += ['--retry-delay-ms', str(retry_delay_ms), '--timeout-sec', str(timeout_sec)] + cmd += target_zone.zone_args() + target_zone.cluster.admin(cmd, debug_rgw=1) def zonegroup_bucket_checkpoint(zonegroup_conns, bucket_name): for source_conn in zonegroup_conns.rw_zones: -- 2.39.5