]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: require mimic mons for require_osd_release=mimic
authorSage Weil <sage@redhat.com>
Thu, 13 Dec 2018 15:14:03 +0000 (09:14 -0600)
committerSage Weil <sage@redhat.com>
Thu, 3 Jan 2019 17:17:31 +0000 (11:17 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 51cbf07e7b993b8dfdeb90d198d644c4e2bea11f..810feb3dbfc90744144e5a1572fa3c89b956dde8 100644 (file)
@@ -10194,6 +10194,12 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       goto reply;
     }
     if (rel == CEPH_RELEASE_MIMIC) {
+      if (!mon->monmap->get_required_features().contains_all(
+           ceph::features::mon::FEATURE_MIMIC)) {
+       ss << "not all mons are mimic";
+       err = -EPERM;
+       goto reply;
+      }
       if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_MIMIC))
            && !sure) {
        ss << "not all up OSDs have CEPH_FEATURE_SERVER_MIMIC feature";