From 9af7afbe86df83d5f348ea94dbef6af0c0fa7909 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Wed, 7 Apr 2021 12:49:50 +0300 Subject: [PATCH] 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 (cherry picked from commit 83e89dfa3358fe91597d6714483f96b21a234ae6) --- src/rgw/rgw_bucket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 7d836883fca..939e5e95029 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -1024,7 +1024,7 @@ int RGWBucket::sync(RGWBucketAdminOpState& op_state, map *at { if (!store->svc()->zone->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) { -- 2.47.3