From 25f9d902c1ca125edcbe3879ca2c41adfe3f638c 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 352d54e8911..f0aad35426a 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -523,8 +523,8 @@ int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosS 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.47.3