Skip to content

Commit

Permalink
[Tier-3]: CEPH-83572752 - RGW multisite sync Error log
Browse files Browse the repository at this point in the history
Signed-off-by: Anuchaithra <[email protected]>
  • Loading branch information
anrao19 committed Mar 6, 2025
1 parent b1e8773 commit 73cf9aa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# script: test_s3cmd.py
# polarion id: CEPH-83572752
config:
test_ops:
sync_error_list: true
31 changes: 31 additions & 0 deletions rgw/v2/tests/s3cmd/test_s3cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
configs/test_disable_and_enable_dynamic_resharding_with_10k_bucket.yaml
configs/test_disable_and_enable_dynamic_resharding_with_1k_bucket.yaml
test_multipart_upload_with_failed_parts_using_s3cmd_and_boto3.yaml
multisite_configs/test_sync_error_list.yaml
Operation:
Create an user
Expand Down Expand Up @@ -408,6 +409,36 @@ def test_exec(config, ssh_con):
elif config.test_ops.get("is_not_master_zone", False):
log.info("This is not the master zone. Skipping tenant user creation.")

elif config.test_ops.get("sync_error_list", False) is True:
is_multisite = utils.is_cluster_multisite()
if is_multisite:
check_sync_status = utils.exec_shell_cmd("radosgw-admin sync status")
if not check_sync_status:
raise AssertionError("Sync status output is empty")
log.info(f"sync status op is: {check_sync_status}")
if "failed" in check_sync_status or "ERROR" in check_sync_status:
log.info("sync is in error state")
if "behind" in check_sync_status or "recovering" in check_sync_status:
log.info("sync is in progress")
log.info("check cluster for sync error list")
sync_error_list = utils.exec_shell_cmd("sudo radosgw-admin sync error list")
sync_error_json = json.loads(sync_error_list)
error_exist = False
for ent in sync_error_json:
if len(ent["entries"]) !=0:
error_exist = True
break
if error_exist:
log.error(
f"To trim error manullay try running radosgw-admin sync error trim, since error could be an issue. So trim is not recommanded"
)
log.error(
f"Post clearing sync error trim run sync erro list to verify errors are trimmed"
)
log.error(f"Sync error data exist in cluster")
else:
log.info(f"Sync error list is empty")

else:
user_name = resource_op.create_users(no_of_users_to_create=1)[0]["user_id"]
tenant = "tenant"
Expand Down

0 comments on commit 73cf9aa

Please sign in to comment.