Skip to content

Commit

Permalink
rgw: parse tenant name out of rgwx-bucket-instance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cbodley committed May 12, 2021
1 parent 0b5f2ff commit 2913424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2913424

Please sign in to comment.