From: Yuval Lifshitz Date: Wed, 7 Apr 2021 09:49:50 +0000 (+0300) Subject: rgw/multisite: return correct error code when op fails X-Git-Tag: v17.1.0~2333^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=83e89dfa3358fe91597d6714483f96b21a234ae6;p=ceph-ci.git rgw/multisite: return correct error code when op fails when trying to disable/enbale sync on non-master zone Fixes: https://tracker.ceph.com/issues/50201 Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index fe499a46d48..af1bbdc4a38 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -929,7 +929,7 @@ int RGWBucket::sync(RGWBucketAdminOpState& op_state, const DoutPrefixProvider *d { if (!store->is_meta_master()) { set_err_msg(err_msg, "ERROR: failed to update bucket sync: only allowed on meta master zone"); - return EINVAL; + return -EINVAL; } bool sync = op_state.will_sync_bucket(); if (sync) {