Skip to content

Commit

Permalink
Merge pull request ceph#59960 from smanjara/wip-fix-missing-http-data
Browse files Browse the repository at this point in the history
rgw/multisite:  include request body when CreateBucket op is forwarded to master

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley authored Jan 9, 2025
2 parents 83d7437 + 43a6f12 commit 65271d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/rgw/rgw_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@ class RGWCreateBucket : public RGWOp {
bool relaxed_region_enforcement = false;
RGWCORSConfiguration cors_config;
std::set<std::string> rmattr_names;
bufferlist in_data;

virtual bool need_metadata_upload() const { return false; }

Expand Down
4 changes: 4 additions & 0 deletions src/rgw/rgw_rest_s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 65271d8

Please sign in to comment.