]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: make setting require-osd-release idempotent 16706/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 1 Aug 2017 01:51:47 +0000 (21:51 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 1 Aug 2017 01:51:47 +0000 (21:51 -0400)
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/mon/OSDMonitor.cc

index b0c1f107c6956d1acfa63d39176c6c49af101c61..994f184c194e84a159e692efafabbac672842761 100644 (file)
@@ -8720,6 +8720,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       err = -EINVAL;
       goto reply;
     }
+    if (rel == osdmap.require_osd_release) {
+      // idempotent
+      err = 0;
+      goto reply;
+    }
     if (rel == CEPH_RELEASE_LUMINOUS) {
       if (!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_LUMINOUS)) {
        ss << "not all up OSDs have CEPH_FEATURE_SERVER_LUMINOUS feature";