diff options
author | Babu Shanmugam <anbu@enovance.com> | 2013-07-09 08:41:18 +0530 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-07-11 09:21:00 -0700 |
commit | cf8f16d7433b86b0bdfc192f719f3029f04996a6 (patch) | |
tree | 976455c4c99ab4cde5ebce98127648eda296ddbf | |
parent | 5a6251c80dbfb2d0fe9bfd38418e5db42b153058 (diff) | |
download | ceph-cf8f16d7433b86b0bdfc192f719f3029f04996a6.tar.gz |
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 <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_op.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_rados.cc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 7c2cf6d47b1..05c31d61689 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 c836a4eb0f1..3459683a8d7 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<string, bufferlist> src_attrs; string etag; RGWRESTStreamWriteRequest *out_stream_req; |