Skip to content

Commit

Permalink
Merge pull request #14376 from cbodley/wip-rgw-forward-canned-acl
Browse files Browse the repository at this point in the history
rgw: fix for EINVAL errors on forwarded bucket put_acl requests
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
  • Loading branch information
oritwas committed Apr 11, 2017
2 parents d084f68 + 1c863a7 commit 8c25738
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4172,9 +4172,13 @@ void RGWPutACLs::execute()
return;
}

// forward bucket acl requests to meta master zone
if (s->object.empty() && !store->is_meta_master()) {
bufferlist in_data;
in_data.append(data, len);
// include acl data unless it was generated from a canned_acl
if (s->canned_acl.empty()) {
in_data.append(data, len);
}
op_ret = forward_request_to_master(s, NULL, store, in_data, NULL);
if (op_ret < 0) {
ldout(s->cct, 20) << __func__ << "forward_request_to_master returned ret=" << op_ret << dendl;
Expand Down

0 comments on commit 8c25738

Please sign in to comment.