]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: DeleteLC should be forwarded to master zone
authorChang Liu <liuchang0812@gmail.com>
Tue, 28 May 2019 08:46:18 +0000 (16:46 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 24 Jun 2019 10:09:26 +0000 (12:09 +0200)
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
(cherry picked from commit f75087fd73ae7fe5818b0620c53865b78b9cd0a9)

src/rgw/rgw_op.cc

index 6ad6cc321f16d9ca29b8a9fabe07a8562bf17279..19c07140f3369eb7e9a41c176c84dd94f6b8b23c 100644 (file)
@@ -5259,6 +5259,14 @@ void RGWPutLC::execute()
 
 void RGWDeleteLC::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;
+    }
+  }
   map<string, bufferlist> attrs = s->bucket_attrs;
   attrs.erase(RGW_ATTR_LC);
   op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,