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 <ylifshit@redhat.com>
This commit is contained in:
Yuval Lifshitz 2021-04-07 12:49:50 +03:00
parent 79c5b078e6
commit 83e89dfa33

View File

@ -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) {