Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test reshard feature after bucket owner is changed #642

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Polarion ID : CEPH-83574627
# Script : s3_swift/test_dynamic_bucket_resharding.py
config:
anrao19 marked this conversation as resolved.
Show resolved Hide resolved
objects_count: 50
objects_size_range:
min: 15
max: 20
sharding_type: manual
shards: 97
test_ops:
bucket_chown: True
15 changes: 15 additions & 0 deletions rgw/v2/tests/s3_swift/test_dynamic_bucket_resharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
multisite_configs/test_bucket_generation.yaml
multisite_configs/test_resharding_disable_in_zonegroup.yaml
multisite_configs/test_dynamic_resharding_quota_exceed.yaml
multisite_configs/test_bucket_chown_reshard.yaml

configs/test_bucket_index_shards.yaml
configs/test_dbr_with_custom_objs_per_shard_and_max_dynamic_shard.yaml
Expand Down Expand Up @@ -160,6 +161,20 @@ def test_exec(config, ssh_con):
)
anrao19 marked this conversation as resolved.
Show resolved Hide resolved
objects_created_list.append((s3_object_name, s3_object_path))

if config.test_ops.get("bucket_chown", False) is True:
log.info("Create new user and change bucket ownership")
new_user = s3lib.create_users(1)
new_user = new_user[0]
new_auth = Auth(new_user, ssh_con, ssl=config.ssl)
new_conn = new_auth.do_auth()
new_name = new_user["user_id"]
out = reusable.unlink_bucket(user_info["user_id"], bucket_name)
log.info("Bucket unlink successful")
out1 = reusable.link_chown_nontenant_to_nontenant(
new_user["user_id"], bucket_name
)
log.info(f"Bucket ownership changed to {new_name}")

if config.test_ops.get("verify_bucket_gen", False) is True:
bucket_gen_before = reusable.fetch_bucket_gen(bucket.name)
log.info(f"Current Bucket generation value is {bucket_gen_before}")
Expand Down
Loading