pr#14082 is incomplete, cors should be redirect to master
Fixes: http://tracker.ceph.com/issues/16888
Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>
(cherry picked from commit
7dd099588a47024b410d513cb8ea919731718fa7)
Conflicts:
src/rgw/rgw_op.cc (jewel does not have
5fff6371d8e)
src/test/rgw/rgw_multi/tests.py (jewel does not have this file)
if (op_ret < 0)
return;
+ if (!store->is_meta_master()) {
+ op_ret = forward_request_to_master(s, NULL, store, in_data, nullptr);
+ if (op_ret < 0) {
+ ldout(s->cct, 20) << __func__ << "forward_request_to_master returned ret=" << op_ret << dendl;
+ return;
+ }
+ }
+
bool is_object_op = (!s->object.empty());
if (is_object_op) {
store->get_bucket_instance_obj(s->bucket, obj);
class RGWPutCORS : public RGWOp {
protected:
bufferlist cors_bl;
+ bufferlist in_data;
public:
RGWPutCORS() {}
goto done_err;
}
+ // forward bucket cors requests to meta master zone
+ if (!store->is_meta_master()) {
+ /* only need to keep this data around if we're not meta master */
+ in_data.append(data, len);
+ }
+
if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
ldout(s->cct, 15) << "CORSConfiguration";
cors_config->to_xml(*_dout);