]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: prevent post-jewel OSDs unless require_jewel_osds
authorSage Weil <sage@redhat.com>
Tue, 1 Nov 2016 16:04:39 +0000 (12:04 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Nov 2016 16:04:53 +0000 (12:04 -0400)
We want all upgrades to stop at jewel.  Do this by
requiring that the admin set require_jewel_osds before
allowing post-jewel OSDs (i.e., OSDs with kraken feature)
from starting.

This is similar to the hammer stop we required, except
that there we relied on the feature bits alone.  Here,
we implicitly require that the admin also set the
require_jewel_osds flag.

Backport: jewel
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index ef0d87a9be4e3b9a2e1acfe7fc48ecdc293f330d..d3cd044391ddf9c8d220d5c0846429117e015ad3 100644 (file)
@@ -2061,6 +2061,15 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
     }
   }
 
+  // make sure upgrades stop at jewel
+  if ((m->osd_features & CEPH_FEATURE_SERVER_KRAKEN) &&
+      !osdmap.test_flag(CEPH_OSDMAP_REQUIRE_JEWEL)) {
+    mon->clog->info() << "disallowing boot of post-jewel OSD "
+                     << m->get_orig_source_inst()
+                     << " because require_jewel_osds is not set\n";
+    goto ignore;
+  }
+
   // make sure upgrades stop at hammer
   //  * HAMMER_0_94_4 is the required hammer feature
   //  * MON_METADATA is the first post-hammer feature