From: Babu Shanmugam Date: Tue, 9 Jul 2013 03:11:18 +0000 (+0530) Subject: rgw: handle bucket removal by system user on master region X-Git-Tag: v0.67-rc1~86 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf8f16d7433b86b0bdfc192f719f3029f04996a6;p=ceph.git rgw: handle bucket removal by system user on master region intra region bucket creation, deletion and copy object to and from remote regions validated Signed-off-by: Babu Shanmugam Reviewed-by:Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 7c2cf6d47b12..05c31d61689d 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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; diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index c836a4eb0f18..3459683a8d7d 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2603,7 +2603,6 @@ set_err_state: if (remote_dest) { /* dest is in a different region, copy it there */ - map src_attrs; string etag; RGWRESTStreamWriteRequest *out_stream_req;