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>
/* 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;
if (remote_dest) {
/* dest is in a different region, copy it there */
- map<string, bufferlist> src_attrs;
string etag;
RGWRESTStreamWriteRequest *out_stream_req;