diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 252adab7c0df5..f131c35e9068a 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3703,7 +3703,6 @@ void RGWCreateBucket::execute(optional_yield y) if (!driver->is_meta_master()) { // apply bucket creation on the master zone first - bufferlist in_data; JSONParser jp; op_ret = rgw_forward_request_to_master(this, *s->penv.site, s->owner.id, &in_data, &jp, s->info, y); diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index 9f747501729e0..feddb21eb56d4 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -1111,6 +1111,7 @@ class RGWCreateBucket : public RGWOp { bool relaxed_region_enforcement = false; RGWCORSConfiguration cors_config; std::set rmattr_names; + bufferlist in_data; virtual bool need_metadata_upload() const { return false; } diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 30ebe8e8965c3..13f6bb0015a4c 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -2533,6 +2533,10 @@ int RGWCreateBucket_ObjStore_S3::get_params(optional_yield y) if ((op_ret < 0) && (op_ret != -ERR_LENGTH_REQUIRED)) return op_ret; + if (!driver->is_meta_master()) { + in_data.append(data); + } + if (data.length()) { RGWCreateBucketParser parser;