From dbd04fd292dc3ff574d1db726278aeebcf752d3e Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 12 May 2021 14:13:13 -0400 Subject: [PATCH] rgw: parse tenant name out of rgwx-bucket-instance used by multisite bucket full sync to request the listing of a specific bucket instance. if the bucket lives under a tenant, we need to get that out of the rgwx-bucket-instance header, because the http request path only names the bucket Fixes: https://tracker.ceph.com/issues/50785 Signed-off-by: Casey Bodley (cherry picked from commit 291342425e4b49de9b6985c718f6cb9210f5554d) --- src/rgw/rgw_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 2339dccb7fd0e..760c6bbc89b2d 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -574,8 +574,8 @@ int rgw_build_bucket_policies(rgw::sal::RGWRadosStore* store, struct req_state* string bi = s->info.args.get(RGW_SYS_PARAM_PREFIX "bucket-instance"); if (!bi.empty()) { - string bucket_name; - ret = rgw_bucket_parse_bucket_instance(bi, &bucket_name, &s->bucket_instance_id, &s->bucket_instance_shard_id); + // note: overwrites s->bucket_name, may include a tenant/ + ret = rgw_bucket_parse_bucket_instance(bi, &s->bucket_name, &s->bucket_instance_id, &s->bucket_instance_shard_id); if (ret < 0) { return ret; } -- 2.39.5