From: Alex Ainscow Date: Fri, 10 Jan 2025 15:58:06 +0000 (-0500) Subject: mon/OSDMonitor: update to umbrella X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d1e8ced7053bacab1e31be346ac2c710fa69be7;p=ceph.git mon/OSDMonitor: update to umbrella Signed-off-by: Alex Ainscow --- diff --git a/doc/dev/release-checklists.rst b/doc/dev/release-checklists.rst index df8cb90bbf3f..0e2725717a97 100644 --- a/doc/dev/release-checklists.rst +++ b/doc/dev/release-checklists.rst @@ -83,10 +83,10 @@ Mon - [x] mon/MgrMonitor.cc adjust `always_on_modules` - [x] common/options/global.yaml.in define `mon_debug_no_require_X` - [x] common/options/global.yaml.in 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 +- [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 - [ ] qa/workunits/cephtool/test.sh: adjust `require-osd-release` test OSDMap diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 1b52f83d61a4..ed1523f652f6 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -897,7 +897,7 @@ COMMAND("osd unset " "notieragent|nosnaptrim|noautoscale", "unset ", "osd", "rw") COMMAND("osd require-osd-release "\ - "name=release,type=CephChoices,strings=octopus|pacific|quincy|reef|squid|tentacle " + "name=release,type=CephChoices,strings=octopus|pacific|quincy|reef|squid|tentacle|umbrella " "name=yes_i_really_mean_it,type=CephBool,req=false", "set the minimum allowed OSD release to participate in the cluster", "osd", "rw") diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 53e67fafb31c..66a2f4f763da 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -685,16 +685,16 @@ void OSDMonitor::create_initial() if (newmap.nearfull_ratio > 1.0) newmap.nearfull_ratio /= 100; // new cluster should require latest by default - if (g_conf().get_val("mon_debug_no_require_tentacle")) { - if (g_conf().get_val("mon_debug_no_require_squid")) { - derr << __func__ << " mon_debug_no_require_tentacle and squid=true" << dendl; - newmap.require_osd_release = ceph_release_t::reef; - } else { - derr << __func__ << " mon_debug_no_require_tentacle=true" << dendl; + if (g_conf().get_val("mon_debug_no_require_umbrella")) { + if (g_conf().get_val("mon_debug_no_require_tentacle")) { + derr << __func__ << " mon_debug_no_require_umbrella and tentacle=true" << dendl; newmap.require_osd_release = ceph_release_t::squid; + } else { + derr << __func__ << " mon_debug_no_require_umbrella=true" << dendl; + newmap.require_osd_release = ceph_release_t::tentacle; } } else { - newmap.require_osd_release = ceph_release_t::tentacle; + newmap.require_osd_release = ceph_release_t::umbrella; } ceph_release_t r = ceph_release_from_name(g_conf()->mon_osd_initial_require_min_compat_client); @@ -3498,21 +3498,14 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op) ceph_assert(m->get_orig_source_inst().name.is_osd()); // lower bound of N-2 - if (!HAVE_FEATURE(m->osd_features, SERVER_REEF)) { + if (!HAVE_FEATURE(m->osd_features, SERVER_SQUID)) { mon.clog->info() << "disallowing boot of OSD " << m->get_orig_source_inst() - << " because the osd lacks CEPH_FEATURE_SERVER_REEF"; + << " because the osd lacks CEPH_FEATURE_SERVER_SQUID"; goto ignore; } // make sure osd versions do not span more than 3 releases - if (HAVE_FEATURE(m->osd_features, SERVER_SQUID) && - osdmap.require_osd_release < ceph_release_t::quincy) { - mon.clog->info() << "disallowing boot of squid+ OSD " - << m->get_orig_source_inst() - << " because require_osd_release < quincy"; - goto ignore; - } if (HAVE_FEATURE(m->osd_features, SERVER_TENTACLE) && osdmap.require_osd_release < ceph_release_t::reef) { mon.clog->info() << "disallowing boot of tentacle+ OSD " @@ -3520,6 +3513,13 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op) << " because require_osd_release < reef"; goto ignore; } + if (HAVE_FEATURE(m->osd_features, SERVER_UMBRELLA) && + osdmap.require_osd_release < ceph_release_t::squid) { + mon.clog->info() << "disallowing boot of umbrella+ OSD " + << m->get_orig_source_inst() + << " because require_osd_release < squid"; + goto ignore; + } // See crimson/osd/osd.cc: OSD::_send_boot if (auto type_iter = m->metadata.find("osd_type"); @@ -12213,7 +12213,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = 0; goto reply_no_propose; } - if (osdmap.require_osd_release < ceph_release_t::quincy && !sure) { + if (osdmap.require_osd_release < ceph_release_t::squid && !sure) { ss << "Not advisable to continue since current 'require_osd_release' " << "refers to a very old Ceph release. Pass " << "--yes-i-really-mean-it if you really wish to continue."; @@ -12226,20 +12226,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EPERM; goto reply_no_propose; } - if (rel == ceph_release_t::reef) { - if (!mon.monmap->get_required_features().contains_all( - ceph::features::mon::FEATURE_REEF)) { - ss << "not all mons are reef"; - err = -EPERM; - goto reply_no_propose; - } - if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_REEF)) - && !sure) { - ss << "not all up OSDs have CEPH_FEATURE_SERVER_REEF feature"; - err = -EPERM; - goto reply_no_propose; - } - } else if (rel == ceph_release_t::squid) { + if (rel == ceph_release_t::squid) { if (!mon.monmap->get_required_features().contains_all( ceph::features::mon::FEATURE_SQUID)) { ss << "not all mons are squid"; @@ -12265,6 +12252,19 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EPERM; goto reply_no_propose; } + } else if (rel == ceph_release_t::umbrella) { + if (!mon.monmap->get_required_features().contains_all( + ceph::features::mon::FEATURE_UMBRELLA)) { + ss << "not all mons are umbrella"; + err = -EPERM; + goto reply_no_propose; + } + if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_UMBRELLA)) + && !sure) { + ss << "not all up OSDs have CEPH_FEATURE_SERVER_UMBRELLA feature"; + err = -EPERM; + goto reply_no_propose; + } } else { ss << "not supported for this release"; err = -EPERM;