]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc, common, mon, qa: Mon-related updates for reef
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 4 Aug 2022 10:06:42 +0000 (10:06 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 20 Sep 2022 14:26:59 +0000 (14:26 +0000)
This bases on two commits:
  * 7bbc92eda368dc70a421eed600532a165f5aecc1 and
  * 6b22d478634f3f2a3b57f4a674c45ac2ba61513a which seems to be
    a fixup to former one.

In contrast to them, in `OSDMonitor::create_initial()` I updated
also `newmap.require_osd_release` to pacific when
`mon_debug_no_require_reef` and `mon_debug_no_require_quincy`.
Please take have an extra look on that during the review.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
doc/dev/release-checklists.rst
qa/standalone/mon/misc.sh
qa/workunits/cephtool/test.sh
src/common/options/global.yaml.in
src/mon/MonCommands.h
src/mon/OSDMonitor.cc

index 2ec9ac75abc3e7229d314b5108775a28a83e153e..91172c2956914ab7c5ead976f2affcc79794d800 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/global.yaml.in define `mon_debug_no_require_X`
+- [x] common/options/global.yaml.in 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 900501fa367365c38b60de08b81e403e36c67ea4..f7d349e9eb8b0c792778ec407bc313ebb99087d4 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-quincy "
+    CEPH_ARGS+="--mon-debug-no-require-reef "
 
     run_mon $dir a --public-addr $MONA || return 1
     run_mon $dir b --public-addr $MONB || return 1
@@ -183,7 +183,8 @@ 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, pacific
+    # quorum's monitor features contain kraken, luminous, mimic, nautilus,
+    # octopus, pacific, quincy
     jqfilter='.features.quorum_mon[]|select(. == "kraken")'
     jq_success "$jqinput" "$jqfilter" "kraken" || return 1
     jqfilter='.features.quorum_mon[]|select(. == "luminous")'
@@ -198,6 +199,8 @@ function TEST_mon_features() {
     jq_success "$jqinput" "$jqfilter" "pacific" || return 1
     jqfilter='.features.quorum_mon[]|select(. == "quincy")'
     jq_success "$jqinput" "$jqfilter" "quincy" || return 1
+    jqfilter='.features.quorum_mon[]|select(. == "reef")'
+    jq_success "$jqinput" "$jqfilter" "reef" || return 1
 
     # monmap must have no persistent features set, because we
     # don't currently have a quorum made out of all the monitors
@@ -212,7 +215,7 @@ function TEST_mon_features() {
     # validate 'mon feature ls'
 
     jqinput="$(ceph mon feature ls --format=json 2>/dev/null)"
-    # k l m n o p 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")'
@@ -227,6 +230,8 @@ function TEST_mon_features() {
     jq_success "$jqinput" "$jqfilter" "pacific" || return 1
     jqfilter='.all.supported[] | select(. == "quincy")'
     jq_success "$jqinput" "$jqfilter" "quincy" || return 1
+    jqfilter='.all.supported[] | select(. == "reef")'
+    jq_success "$jqinput" "$jqfilter" "reef" || return 1
 
     # start third monitor
     run_mon $dir c --public-addr $MONC || return 1
@@ -265,6 +270,8 @@ function TEST_mon_features() {
     jq_success "$jqinput" "$jqfilter" || return 1
     jqfilter='.monmap.features.persistent[]|select(. == "quincy")'
     jq_success "$jqinput" "$jqfilter" "quincy" || return 1
+    jqfilter='.monmap.features.persistent[]|select(. == "reef")'
+    jq_success "$jqinput" "$jqfilter" "reef" || return 1
 
     CEPH_ARGS=$CEPH_ARGS_orig
     # that's all folks. thank you for tuning in.
index b545e08facbebf8fbe951cf7ef8271aa6acd5b77..7ee0c1d9045991656283a604cc8e2a326655bc10 100755 (executable)
@@ -1520,10 +1520,10 @@ function test_mon_osd()
        expect_false ceph osd set $f
        expect_false ceph osd unset $f
   done
-  ceph osd require-osd-release quincy
+  ceph osd require-osd-release reef
   # can't lower
+  expect_false ceph osd require-osd-release quincy
   expect_false ceph osd require-osd-release pacific
-  expect_false ceph osd require-osd-release octopus
   # these are no-ops but should succeed.
 
   ceph osd set noup
index 00eb445acda7358ce753ff800bbe86a17ae5d10c..ea3c1f4fdb7e551ee0ecc05d84df1a641ea170c0 100644 (file)
@@ -1959,19 +1959,19 @@ options:
   see_also:
   - mon_debug_dump_transactions
   with_legacy: true
-- name: mon_debug_no_require_pacific
+- name: mon_debug_no_require_quincy
   type: bool
   level: dev
-  desc: do not set pacific feature for new mon clusters
+  desc: do not set quincy feature for new mon clusters
   default: false
   services:
   - mon
   flags:
   - cluster_create
-- name: mon_debug_no_require_quincy
+- name: mon_debug_no_require_reef
   type: bool
   level: dev
-  desc: do not set quincy feature for new mon clusters
+  desc: do not set reef feature for new mon clusters
   default: false
   services:
   - mon
index b4465a9893ec7fd148e15fca1e991c3722689fce..2de6baf27a40e6d49145dd63b3a8cd319a6db2dd 100644 (file)
@@ -851,7 +851,7 @@ COMMAND("osd unset "
        "notieragent|nosnaptrim",
        "unset <key>", "osd", "rw")
 COMMAND("osd require-osd-release "\
-       "name=release,type=CephChoices,strings=octopus|pacific|quincy "
+       "name=release,type=CephChoices,strings=octopus|pacific|quincy|reef "
         "name=yes_i_really_mean_it,type=CephBool,req=false",
        "set the minimum allowed OSD release to participate in the cluster",
        "osd", "rw")
index 51df33d0a57382f5495cf8d4d1d4048617a6c60a..ece26cd54f06b2b6ea365502e498bad6c2808e4c 100644 (file)
@@ -674,16 +674,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<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_quincy=true" << dendl;
+  if (g_conf().get_val<bool>("mon_debug_no_require_reef")) {
+    if (g_conf().get_val<bool>("mon_debug_no_require_quincy")) {
+      derr << __func__ << " mon_debug_no_require_reef and quincy=true" << dendl;
       newmap.require_osd_release = ceph_release_t::pacific;
+    } else {
+      derr << __func__ << " mon_debug_no_require_reef=true" << dendl;
+      newmap.require_osd_release = ceph_release_t::quincy;
     }
   } else {
-    newmap.require_osd_release = ceph_release_t::quincy;
+    newmap.require_osd_release = ceph_release_t::reef;
   }
 
   ceph_release_t r = ceph_release_from_name(g_conf()->mon_osd_initial_require_min_compat_client);
@@ -3523,21 +3523,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_OCTOPUS)) {
+  if (!HAVE_FEATURE(m->osd_features, SERVER_PACIFIC)) {
     mon.clog->info() << "disallowing boot of OSD "
                     << m->get_orig_source_inst()
-                    << " because the osd lacks CEPH_FEATURE_SERVER_OCTOPUS";
+                    << " because the osd lacks CEPH_FEATURE_SERVER_PACIFIC";
     goto ignore;
   }
 
   // make sure osd versions do not span more than 3 releases
-  if (HAVE_FEATURE(m->osd_features, SERVER_PACIFIC) &&
-      osdmap.require_osd_release < ceph_release_t::nautilus) {
-    mon.clog->info() << "disallowing boot of pacific+ OSD "
-                     << m->get_orig_source_inst()
-                     << " because require_osd_release < nautilus";
-    goto ignore;
-  }
   if (HAVE_FEATURE(m->osd_features, SERVER_QUINCY) &&
       osdmap.require_osd_release < ceph_release_t::octopus) {
     mon.clog->info() << "disallowing boot of quincy+ OSD "
@@ -3545,6 +3538,13 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
                      << " because require_osd_release < octopus";
     goto ignore;
   }
+  if (HAVE_FEATURE(m->osd_features, SERVER_REEF) &&
+      osdmap.require_osd_release < ceph_release_t::pacific) {
+    mon.clog->info() << "disallowing boot of reef+ OSD "
+                     << m->get_orig_source_inst()
+                     << " because require_osd_release < pacific";
+    goto ignore;
+  }
 
   if (osdmap.stretch_mode_enabled &&
       !(m->osd_features & CEPH_FEATUREMASK_STRETCH_MODE)) {
@@ -11595,27 +11595,14 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       err = 0;
       goto reply;
     }
-    ceph_assert(osdmap.require_osd_release >= ceph_release_t::octopus);
+    ceph_assert(osdmap.require_osd_release >= ceph_release_t::pacific);
     if (!osdmap.get_num_up_osds() && !sure) {
       ss << "Not advisable to continue since no OSDs are up. Pass "
         << "--yes-i-really-mean-it if you really wish to continue.";
       err = -EPERM;
       goto reply;
     }
-    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;
-      }
-      if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_OCTOPUS))
-           && !sure) {
-       ss << "not all up OSDs have CEPH_FEATURE_SERVER_OCTOPUS feature";
-       err = -EPERM;
-       goto reply;
-      }
-    } else if (rel == ceph_release_t::pacific) {
+    if (rel == ceph_release_t::pacific) {
       if (!mon.monmap->get_required_features().contains_all(
            ceph::features::mon::FEATURE_PACIFIC)) {
        ss << "not all mons are pacific";
@@ -11641,6 +11628,19 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
        err = -EPERM;
        goto reply;
       }
+    } else 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;
+      }
+      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;
+      }
     } else {
       ss << "not supported for this release";
       err = -EPERM;