]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: parse tenant name out of rgwx-bucket-instance 41316/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 12 May 2021 18:13:13 +0000 (14:13 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 12 May 2021 18:13:15 +0000 (14:13 -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>
src/rgw/rgw_op.cc

index f39645fdde61dcaa01bf137be2db6ebf707d57d9..43acf7b1c567d51903d5825bc008cbb59ad02dfc 100644 (file)
@@ -528,8 +528,8 @@ int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* st
 
   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;
     }