From: Chang Liu Date: Tue, 28 May 2019 08:46:52 +0000 (+0800) Subject: rgw: RGWDeleteCORS should be forwarded to master zone X-Git-Tag: v14.2.3~133^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=185f9c10e81df9b7f778c4bb8c55f2a81998538e;p=ceph.git rgw: RGWDeleteCORS should be forwarded to master zone Signed-off-by: Chang Liu (cherry picked from commit 03ab155a8f399186e17aea56e2b05b5cd7886e4f) --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 19c07140f33..fa300ce5157 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -5338,6 +5338,15 @@ int RGWDeleteCORS::verify_permission() void RGWDeleteCORS::execute() { + if (!store->svc.zone->is_meta_master()) { + bufferlist data; + op_ret = forward_request_to_master(s, nullptr, store, data, nullptr); + if (op_ret < 0) { + ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl; + return; + } + } + op_ret = retry_raced_bucket_write(store, s, [this] { op_ret = read_bucket_cors(); if (op_ret < 0)