]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: parse tenant name out of rgwx-bucket-instance 45523/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 12 May 2021 18:13:13 +0000 (14:13 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 18 Mar 2022 16:33:22 +0000 (12:33 -0400)
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 <cbodley@redhat.com>
(cherry picked from commit 291342425e4b49de9b6985c718f6cb9210f5554d)

src/rgw/rgw_op.cc

index 2339dccb7fd0e092f2677cf5d8847fdf5390b548..760c6bbc89b2d7f721ad50b6a6e3c05721c83221 100644 (file)
@@ -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;
     }