From: Shilpa Jagannath Date: Thu, 22 Aug 2019 09:13:40 +0000 (+0530) Subject: rgw: after linking bucket to a tenanted user, bucket name should include 'tenant... X-Git-Tag: v15.1.0~1744^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f3f24f65850fa3d7ac442bb5b178b018bdf1a818;p=ceph.git rgw: after linking bucket to a tenanted user, bucket name should include 'tenant/' prefix. On account of recent rgw metadata refactoring changes, bucket link was broken. Bucket name was missing the tenant name prefix. Signed-off-by: Shilpa Jagannath --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 549b75b1a3a3..f48c8dd652ef 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -653,6 +653,8 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, optional_yield y, return -EINVAL; } rgw_bucket old_bucket = bucket; + rgw_user user_id = op_state.get_user_id(); + bucket.tenant = user_id.tenant; if (!op_state.new_bucket_name.empty()) { auto pos = op_state.new_bucket_name.find('/'); if (pos != string::npos) {