]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: enable to update acl of bucket created in slave zonegroup 14082/head
authorGuo Zhandong <guozhandong@cmss.chinamobile.com>
Wed, 22 Mar 2017 10:00:37 +0000 (18:00 +0800)
committerGuo Zhandong <guozhandong@cmss.chinamobile.com>
Thu, 23 Mar 2017 00:53:45 +0000 (08:53 +0800)
Fixes: http://tracker.ceph.com/issues/16888
Signed-off-by: Guo Zhandong <guozhandong@cmss.chinamobile.com>
src/rgw/rgw_op.cc

index aaf7f96438cf9d629434d5fd2717c44ce2b8cb01..1443f68deb575aa533b505815a14d16fdd407ae5 100644 (file)
@@ -4189,6 +4189,16 @@ void RGWPutACLs::execute()
     return;
   }
 
+  if (s->object.empty() && !store->is_meta_master()) {
+    bufferlist in_data;
+    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;
+      return;
+    }
+  }
+
   if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
     ldout(s->cct, 15) << "Old AccessControlPolicy";
     policy->to_xml(*_dout);