Skip to content

Commit

Permalink
[Tier-3]Archive zone testing(Enable/Disable per bucket Replication to…
Browse files Browse the repository at this point in the history
… Archive Zone)

Signed-off-by: Anuchaithra <[email protected]>
  • Loading branch information
anrao19 committed Mar 19, 2024
1 parent 574cc47 commit 40c6a68
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Polarian TC : CEPH-83575879
# script: test_multisite_bucket_granular_sync_policy.py
config:
user_count: 1
bucket_count: 1
objects_count: 100
objects_size_range:
min: 5K
max: 2M
test_ops:
archive_zone: true
zonegroup_group: true
zonegroup_status: allowed
zonegroup_flow: true
zonegroup_flow_type: directional
zonegroup_source_zone: archive
zonegroup_dest_zone: primary
zonegroup_source_zones: archive
zonegroup_dest_zones: primary
zonegroup_pipe: true
bucket_group: true
bucket_status: enabled
bucket_flow: false
bucket_pipe: true
bucket_source_zones: archive
bucket_dest_zones: primary
create_object: true
create_bucket: true
write_io_verify_another_site: true
zonegroup_group_remove: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Polarian TC : CEPH-83575879
# script: test_multisite_bucket_granular_sync_policy.py
config:
user_count: 1
bucket_count: 1
objects_count: 100
objects_size_range:
min: 5K
max: 2M
test_ops:
archive_zone: true
zonegroup_group: true
zonegroup_status: allowed
zonegroup_flow: true
zonegroup_flow_type: symmetrical
zonegroup_pipe: true
bucket_group: true
bucket_status: enabled
bucket_flow: false
bucket_pipe: true
create_object: true
create_bucket: true
should_sync: true
write_io_verify_another_site: true
zonegroup_group_remove: true
2 changes: 1 addition & 1 deletion rgw/v2/tests/s3_swift/reusable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ def verify_bucket_sync_on_other_site(rgw_ssh_con, bucket):
else:
log.info(f"bucket {bucket.name} found on other site")
break
if (retry_count > 20) and (len(re_cmd_output["groups"]) == 0):
if (retry_count > 20) and (bucket.name not in re_cmd_output):
raise TestExecError(
f"bucket {bucket.name} did not sync to other site even after 20m"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
multisite_configs/test_multisite_granular_bucketsync_forbidden_allowed.yaml
multisite_configs/test_multisite_granular_bucketsync_sync_to_diff_bucket.yaml
multisite_configs/test_multisite_granular_bucketsync_sync_from_diff_bucket.yaml
multisite_configs/test_multisite_granular_bucketsync_archive_symmetrical.yaml
multisite_configs/test_multisite_granular_bucketsync_archive_directional.yaml
Operation:
Creates delete sync policy group bucket , zonegroupl level
Expand Down Expand Up @@ -63,8 +65,19 @@ def test_exec(config, ssh_con):
if zone["name"] not in zone_list["zones"]:
rgw_nodes = zone["endpoints"][0].split(":")
node_rgw = rgw_nodes[1].split("//")[-1]
log.info(f"Another site is: {zone['name']} and ip {node_rgw}")
break
if config.test_ops.get("archive_zone", False):
if zone["name"] == "archive":
break
else:
break

log.info(f"Another site is: {zone['name']} and ip {node_rgw}")
if config.test_ops.get("archive_zone", False):
if zone["name"] != "archive":
raise TestExecError(
f"archive zone not found {period_details['period_map']['zonegroups'][0]['zones']}"
)

rgw_ssh_con = utils.connect_remote(node_rgw)
if config.test_ops.get("write_io_verify_another_site", False):
other_site_auth = Auth(each_user, rgw_ssh_con, ssl=config.ssl)
Expand Down Expand Up @@ -345,7 +358,7 @@ def test_exec(config, ssh_con):
)
for oc, size in list(config.mapped_sizes.items()):
config.obj_size = size
s3_object_name = "new-" + utils.gen_s3_object_name(
s3_object_name = "sync-" + utils.gen_s3_object_name(
bkt.name, oc
)
log.info(f"s3 object name: {s3_object_name}")
Expand Down

0 comments on commit 40c6a68

Please sign in to comment.