]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: handle bucket removal by system user on master region
authorBabu Shanmugam <anbu@enovance.com>
Tue, 9 Jul 2013 03:11:18 +0000 (08:41 +0530)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 11 Jul 2013 16:21:00 +0000 (09:21 -0700)
intra region bucket creation, deletion and copy object to and from remote regions validated

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>

src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc

index 7c2cf6d47b12d0de2dc4f9bf402b98b09885b7d6..05c31d61689dcc565a516dce25ae2ad37682a29f 100644 (file)
@@ -370,7 +370,9 @@ static int rgw_build_policies(RGWRados *store, struct req_state *s, bool only_bu
       /* we now need to make sure that the operation actually requires copy source, that is
        * it's a copy operation
        */
-      if (!s->local_source ||
+      if (store->region.is_master && s->op == OP_DELETE && s->system_request) {
+        /*If the operation is delete and if this is the master, don't redirect*/
+      } else if (!s->local_source ||
           (s->op != OP_PUT && s->op != OP_COPY) ||
           s->object_str.empty()) {
         return -ERR_PERMANENT_REDIRECT;
index c836a4eb0f18b1a38542716b4ea05e048ca4a625..3459683a8d7de71406c9142a50dc815b672b8141 100644 (file)
@@ -2603,7 +2603,6 @@ set_err_state:
   if (remote_dest) {
     /* dest is in a different region, copy it there */
 
-    map<string, bufferlist> src_attrs;
     string etag;
 
     RGWRESTStreamWriteRequest *out_stream_req;