From: Sage Weil Date: Tue, 1 Nov 2016 16:04:39 +0000 (-0400) Subject: mon/OSDMonitor: prevent post-jewel OSDs unless require_jewel_osds X-Git-Tag: v11.1.0~405^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8fb6ab9ba614808cc2398afc2640f215e681edd;p=ceph.git mon/OSDMonitor: prevent post-jewel OSDs unless require_jewel_osds 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ef0d87a9be4e..d3cd044391dd 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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