]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: updates for quincy
authorSage Weil <sage@newdream.net>
Wed, 27 Jan 2021 21:45:32 +0000 (15:45 -0600)
committerSage Weil <sage@newdream.net>
Thu, 28 Jan 2021 19:29:28 +0000 (13:29 -0600)
Signed-off-by: Sage Weil <sage@newdream.net>
doc/dev/release-checklists.rst
qa/standalone/mon/misc.sh
qa/workunits/cephtool/test.sh
src/common/options.cc
src/mon/MonCommands.h
src/mon/OSDMonitor.cc

index 0793469a211d35c83c727538697769177b8960a7..b64ea2bb5a4e20587140ad1571c4a69ee15b4f63 100644 (file)
@@ -63,15 +63,15 @@ Compatsets
 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
index e5567e7b62d9dc0c22cae20839e6b8ebefd29e06..88c2724833e2241a6b66f231128cea833e50b6e3 100755 (executable)
@@ -172,7 +172,7 @@ function TEST_mon_features() {
     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
@@ -183,7 +183,7 @@ function TEST_mon_features() {
     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")'
@@ -194,6 +194,10 @@ function TEST_mon_features() {
     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
@@ -208,7 +212,7 @@ function TEST_mon_features() {
     # 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 are supported
     jqfilter='.all.supported[] | select(. == "kraken")'
     jq_success "$jqinput" "$jqfilter" "kraken" || return 1
     jqfilter='.all.supported[] | select(. == "luminous")'
@@ -219,6 +223,10 @@ function TEST_mon_features() {
     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
@@ -255,6 +263,8 @@ function TEST_mon_features() {
     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.
index 3c1eb36cb21f3c3e840f90a6dbb7e72434bf809b..66724c515a30f4c2902acd9d5173a22840e8b0b2 100755 (executable)
@@ -1495,12 +1495,10 @@ function test_mon_osd()
        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
index 8e15babf9e3ce20e0f81312315db8c5dbfe883bf..d7a143a6d273131a96b42b2c37e3e3b21826418d 100644 (file)
@@ -2132,17 +2132,17 @@ std::vector<Option> get_global_options() {
     .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)
index fc8ab39083b7cb281613e4713eca4e63e0c9a99a..cc040c88e994bc781faa8809f9ca7bb9ec1bf08f 100644 (file)
@@ -847,7 +847,7 @@ COMMAND("osd unset "
        "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")
index 7bf8a2d76b0cc42eb07730e156f22228c29a6f62..fecc25be10b5677fd3a3f72fd1acadc9e313c1a4 100644 (file)
@@ -660,26 +660,23 @@ 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<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();
@@ -3473,43 +3470,15 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
 
   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 "
@@ -3517,15 +3486,11 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
                      << " 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;
   }
 
@@ -11436,33 +11401,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       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";
@@ -11488,8 +11427,21 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
        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;
     }