]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: make pacific changes
authorSage Weil <sage@redhat.com>
Sat, 28 Mar 2020 14:16:59 +0000 (09:16 -0500)
committerSage Weil <sage@newdream.net>
Wed, 8 Apr 2020 13:09:41 +0000 (08:09 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
doc/dev/release-kickoff-checklist.rst
src/common/options.cc
src/mon/OSDMonitor.cc

index c6d61a30810cedf7fb85ce52d61fbf7aa1f7ba92..484a44952d147f3a8bbf6f85685783992430a9ef 100644 (file)
@@ -55,3 +55,12 @@ Compatsets
 - [x] mon/Monitor.cc (apply_monmap_to_compatset_features())
 - [x] mon/Monitor.cc (calc_quorum_requirements())
 
+Mon
+---
+
+- [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
+
index ed8bc4a81a70d52266c7faeb7b350d2721a30348..0d490269fb81dd899e4a485182240bf879ba1a8d 100644 (file)
@@ -2038,17 +2038,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_nautilus", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    Option("mon_debug_no_require_octopus", Option::TYPE_BOOL, Option::LEVEL_DEV)
     .set_default(false)
     .add_service("mon")
     .set_flag(Option::FLAG_CLUSTER_CREATE)
-    .set_description("do not set nautilus feature for new mon clusters"),
+    .set_description("do not set octopus feature for new mon clusters"),
 
-    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_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
     .set_default(false)
index 234570c4127ba2c4cd621364cd41ac2f683c91a7..4cf1bc2951b8e0ab44d625775a5faacfd547ff51 100644 (file)
@@ -647,16 +647,19 @@ 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_octopus")) {
-    if (g_conf().get_val<bool>("mon_debug_no_require_nautilus")) {
-      derr << __func__ << " mon_debug_no_require_octopus and nautilus=true" << dendl;
-      newmap.require_osd_release = ceph_release_t::mimic;
-    } else {
-      derr << __func__ << " mon_debug_no_require_octopus=true" << dendl;
+  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;
       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;
     }
   } else {
-    newmap.require_osd_release = ceph_release_t::octopus;
+    newmap.require_osd_release = ceph_release_t::pacific;
+  }
+
+  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) {
@@ -3397,6 +3400,13 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
                      << " 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 "
+                     << m->get_orig_source_inst()
+                     << " 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.
@@ -11228,6 +11238,19 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
        err = -EPERM;
        goto reply;
       }
+    } else 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";
+       err = -EPERM;
+       goto reply;
+      }
+      if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_PACIFIC))
+           && !sure) {
+       ss << "not all up OSDs have CEPH_FEATURE_SERVER_PACIFIC feature";
+       err = -EPERM;
+       goto reply;
+      }
     } else {
       ss << "not supported for this release yet";
       err = -EPERM;