Mon
---
-- [ ] qa/standalone/mon/misc adjust `TEST_mon_features` (add X cases and adjust `--mon-debug-no-require-X`)
+- [x] qa/standalone/mon/misc adjust `TEST_mon_features` (add X cases and adjust `--mon-debug-no-require-X`)
- [x] mon/MgrMonitor.cc adjust `always_on_modules`
-- [ ] common/options.cc define `mon_debug_no_require_X`
-- [ ] common/options.cc remove `mon_debug_no_require_X-2`
-- [ ] mon/OSDMonitor.cc `create_initial`: adjust new `require_osd_release`, and add associated `mon_debug_no_require_X`
-- [ ] mon/OSDMonitor.cc `preprocess_boot`: adjust "disallow boot of " condition to disallow X if `require_osd_release` < X-2.
-- [ ] mon/OSDMonitor.cc: adjust "osd require-osd-release" to (1) allow setting X, and (2) check that all mons *and* OSDs have X
-- [ ] mon/MonCommands.h: adjust "osd require-osd-release" allows options to include X
-- [ ] qa/workunits/cephtool/test.sh: adjust `require-osd-release` test
+- [x] common/options.cc define `mon_debug_no_require_X`
+- [x] common/options.cc remove `mon_debug_no_require_X-2`
+- [x] mon/OSDMonitor.cc `create_initial`: adjust new `require_osd_release`, and add associated `mon_debug_no_require_X`
+- [x] mon/OSDMonitor.cc `preprocess_boot`: adjust "disallow boot of " condition to disallow X if `require_osd_release` < X-2.
+- [x] mon/OSDMonitor.cc: adjust "osd require-osd-release" to (1) allow setting X, and (2) check that all mons *and* OSDs have X
+- [x] mon/MonCommands.h: adjust "osd require-osd-release" allows options to include X
+- [x] qa/workunits/cephtool/test.sh: adjust `require-osd-release` test
Code cleanup
CEPH_ARGS+="--mon-initial-members=a,b,c "
CEPH_ARGS+="--mon-host=$MONA,$MONB,$MONC "
CEPH_ARGS+="--mon-debug-no-initial-persistent-features "
- CEPH_ARGS+="--mon-debug-no-require-pacific "
+ CEPH_ARGS+="--mon-debug-no-require-quincy "
run_mon $dir a --public-addr $MONA || return 1
run_mon $dir b --public-addr $MONB || return 1
jq_success "$jqinput" '.monmap.mons | length == 3' || return 1
# quorum contains two monitors
jq_success "$jqinput" '.quorum | length == 2' || return 1
- # quorum's monitor features contain kraken, luminous, mimic, nautilus, octopus
+ # quorum's monitor features contain kraken, luminous, mimic, nautilus, octopus, pacific
jqfilter='.features.quorum_mon[]|select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
jqfilter='.features.quorum_mon[]|select(. == "luminous")'
jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
jqfilter='.features.quorum_mon[]|select(. == "octopus")'
jq_success "$jqinput" "$jqfilter" "octopus" || return 1
+ jqfilter='.features.quorum_mon[]|select(. == "pacific")'
+ jq_success "$jqinput" "$jqfilter" "pacific" || return 1
+ jqfilter='.features.quorum_mon[]|select(. == "quincy")'
+ jq_success "$jqinput" "$jqfilter" "quincy" || return 1
# monmap must have no persistent features set, because we
# don't currently have a quorum made out of all the monitors
# validate 'mon feature ls'
jqinput="$(ceph mon feature ls --format=json 2>/dev/null)"
- # k l m n o are supported
+ # k l m n o p are supported
jqfilter='.all.supported[] | select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
jqfilter='.all.supported[] | select(. == "luminous")'
jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
jqfilter='.all.supported[] | select(. == "octopus")'
jq_success "$jqinput" "$jqfilter" "octopus" || return 1
+ jqfilter='.all.supported[] | select(. == "pacific")'
+ jq_success "$jqinput" "$jqfilter" "pacific" || return 1
+ jqfilter='.all.supported[] | select(. == "quincy")'
+ jq_success "$jqinput" "$jqfilter" "quincy" || return 1
# start third monitor
run_mon $dir c --public-addr $MONC || return 1
jq_success "$jqinput" "$jqfilter" "elector-pinging" || return 1
jqfilter='.monmap.features.persistent | length == 8'
jq_success "$jqinput" "$jqfilter" || return 1
+ jqfilter='.monmap.features.persistent[]|select(. == "quincy")'
+ jq_success "$jqinput" "$jqfilter" "quincy" || return 1
CEPH_ARGS=$CEPH_ARGS_orig
# that's all folks. thank you for tuning in.
expect_false ceph osd set $f
expect_false ceph osd unset $f
done
- ceph osd require-osd-release pacific
+ ceph osd require-osd-release quincy
# can't lower
+ expect_false ceph osd require-osd-release pacific
expect_false ceph osd require-osd-release octopus
- expect_false ceph osd require-osd-release nautilus
- expect_false ceph osd require-osd-release mimic
- expect_false ceph osd require-osd-release luminous
# these are no-ops but should succeed.
ceph osd set noup
.set_description("file to dump paxos transactions to")
.add_see_also("mon_debug_dump_transactions"),
- Option("mon_debug_no_require_octopus", Option::TYPE_BOOL, Option::LEVEL_DEV)
+ Option("mon_debug_no_require_pacific", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(false)
.add_service("mon")
.set_flag(Option::FLAG_CLUSTER_CREATE)
- .set_description("do not set octopus feature for new mon clusters"),
+ .set_description("do not set pacific feature for new mon clusters"),
- Option("mon_debug_no_require_pacific", Option::TYPE_BOOL, Option::LEVEL_DEV)
+ Option("mon_debug_no_require_quincy", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(false)
.add_service("mon")
.set_flag(Option::FLAG_CLUSTER_CREATE)
- .set_description("do not set pacific feature for new mon clusters"),
+ .set_description("do not set quincy feature for new mon clusters"),
Option("mon_debug_no_require_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(false)
"notieragent|nosnaptrim",
"unset <key>", "osd", "rw")
COMMAND("osd require-osd-release "\
- "name=release,type=CephChoices,strings=luminous|mimic|nautilus|octopus|pacific "
+ "name=release,type=CephChoices,strings=octopus|pacific|quincy "
"name=yes_i_really_mean_it,type=CephBool,req=false",
"set the minimum allowed OSD release to participate in the cluster",
"osd", "rw")
if (newmap.nearfull_ratio > 1.0) newmap.nearfull_ratio /= 100;
// new cluster should require latest by default
- if (g_conf().get_val<bool>("mon_debug_no_require_pacific")) {
- if (g_conf().get_val<bool>("mon_debug_no_require_octopus")) {
- derr << __func__ << " mon_debug_no_require_pacific and octopus=true" << dendl;
+ if (g_conf().get_val<bool>("mon_debug_no_require_quincy")) {
+ if (g_conf().get_val<bool>("mon_debug_no_require_pacific")) {
+ derr << __func__ << " mon_debug_no_require_quincy and pacific=true" << dendl;
newmap.require_osd_release = ceph_release_t::nautilus;
} else {
- derr << __func__ << " mon_debug_no_require_pacific=true" << dendl;
- newmap.require_osd_release = ceph_release_t::octopus;
+ derr << __func__ << " mon_debug_no_require_quincy=true" << dendl;
+ newmap.require_osd_release = ceph_release_t::pacific;
}
} else {
- newmap.require_osd_release = ceph_release_t::pacific;
+ newmap.require_osd_release = ceph_release_t::quincy;
}
- if (newmap.require_osd_release >= ceph_release_t::octopus) {
- ceph_release_t r = ceph_release_from_name(
- g_conf()->mon_osd_initial_require_min_compat_client);
- if (!r) {
- ceph_abort_msg("mon_osd_initial_require_min_compat_client is not valid");
- }
- newmap.require_min_compat_client = r;
+ ceph_release_t r = ceph_release_from_name(g_conf()->mon_osd_initial_require_min_compat_client);
+ if (!r) {
+ ceph_abort_msg("mon_osd_initial_require_min_compat_client is not valid");
}
+ newmap.require_min_compat_client = r;
// encode into pending incremental
uint64_t features = newmap.get_encoding_features();
ceph_assert(m->get_orig_source_inst().name.is_osd());
- // force all osds to have gone through luminous prior to upgrade to nautilus
- {
- vector<string> missing;
- if (!HAVE_FEATURE(m->osd_features, SERVER_LUMINOUS)) {
- missing.push_back("CEPH_FEATURE_SERVER_LUMINOUS");
- }
- if (!HAVE_FEATURE(m->osd_features, SERVER_JEWEL)) {
- missing.push_back("CEPH_FEATURE_SERVER_JEWEL");
- }
- if (!HAVE_FEATURE(m->osd_features, SERVER_KRAKEN)) {
- missing.push_back("CEPH_FEATURE_SERVER_KRAKEN");
- }
- if (!HAVE_FEATURE(m->osd_features, OSD_RECOVERY_DELETES)) {
- missing.push_back("CEPH_FEATURE_OSD_RECOVERY_DELETES");
- }
-
- if (!missing.empty()) {
- using std::experimental::make_ostream_joiner;
-
- stringstream ss;
- copy(begin(missing), end(missing), make_ostream_joiner(ss, ";"));
-
- mon.clog->info() << "disallowing boot of OSD "
- << m->get_orig_source_inst()
- << " because the osd lacks " << ss.str();
- goto ignore;
- }
+ // lower bound of N-2
+ if (!HAVE_FEATURE(m->osd_features, SERVER_OCTOPUS)) {
+ mon.clog->info() << "disallowing boot of OSD "
+ << m->get_orig_source_inst()
+ << " because the osd lacks CEPH_FEATURE_SERVER_OCTOPUS";
+ goto ignore;
}
// make sure osd versions do not span more than 3 releases
- if (HAVE_FEATURE(m->osd_features, SERVER_OCTOPUS) &&
- osdmap.require_osd_release < ceph_release_t::mimic) {
- mon.clog->info() << "disallowing boot of octopus+ OSD "
- << m->get_orig_source_inst()
- << " because require_osd_release < mimic";
- goto ignore;
- }
if (HAVE_FEATURE(m->osd_features, SERVER_PACIFIC) &&
osdmap.require_osd_release < ceph_release_t::nautilus) {
mon.clog->info() << "disallowing boot of pacific+ OSD "
<< " because require_osd_release < nautilus";
goto ignore;
}
-
- // The release check here is required because for OSD_PGLOG_HARDLIMIT,
- // we are reusing a jewel feature bit that was retired in luminous.
- if (osdmap.require_osd_release >= ceph_release_t::luminous &&
- osdmap.test_flag(CEPH_OSDMAP_PGLOG_HARDLIMIT) &&
- !(m->osd_features & CEPH_FEATURE_OSD_PGLOG_HARDLIMIT)) {
- mon.clog->info() << "disallowing boot of OSD "
+ if (HAVE_FEATURE(m->osd_features, SERVER_QUINCY) &&
+ osdmap.require_osd_release < ceph_release_t::octopus) {
+ mon.clog->info() << "disallowing boot of quincy+ OSD "
<< m->get_orig_source_inst()
- << " because 'pglog_hardlimit' osdmap flag is set and OSD lacks the OSD_PGLOG_HARDLIMIT feature";
+ << " because require_osd_release < octopus";
goto ignore;
}
err = -EPERM;
goto reply;
}
- if (rel == ceph_release_t::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";
- err = -EPERM;
- goto reply;
- }
- } else if (rel == ceph_release_t::nautilus) {
- if (!mon.monmap->get_required_features().contains_all(
- ceph::features::mon::FEATURE_NAUTILUS)) {
- ss << "not all mons are nautilus";
- err = -EPERM;
- goto reply;
- }
- if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_NAUTILUS))
- && !sure) {
- ss << "not all up OSDs have CEPH_FEATURE_SERVER_NAUTILUS feature";
- err = -EPERM;
- goto reply;
- }
- } else if (rel == ceph_release_t::octopus) {
+ if (rel == ceph_release_t::octopus) {
if (!mon.monmap->get_required_features().contains_all(
ceph::features::mon::FEATURE_OCTOPUS)) {
ss << "not all mons are octopus";
err = -EPERM;
goto reply;
}
+ } else if (rel == ceph_release_t::quincy) {
+ if (!mon.monmap->get_required_features().contains_all(
+ ceph::features::mon::FEATURE_QUINCY)) {
+ ss << "not all mons are quincy";
+ err = -EPERM;
+ goto reply;
+ }
+ if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_QUINCY))
+ && !sure) {
+ ss << "not all up OSDs have CEPH_FEATURE_SERVER_QUINCY feature";
+ err = -EPERM;
+ goto reply;
+ }
} else {
- ss << "not supported for this release yet";
+ ss << "not supported for this release";
err = -EPERM;
goto reply;
}