]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: return correct error code when op fails 40639/head
authorYuval Lifshitz <ylifshit@redhat.com>
Wed, 7 Apr 2021 09:49:50 +0000 (12:49 +0300)
committerYuval Lifshitz <ylifshit@redhat.com>
Wed, 7 Apr 2021 09:51:30 +0000 (12:51 +0300)
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>
src/rgw/rgw_bucket.cc

index fe499a46d488c26a1ed99eb6d07fc2fa3deee06a..af1bbdc4a38619a6296469a8054454a27bc73781 100644 (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) {