summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xqa/standalone/mon/misc.sh14
-rwxr-xr-xqa/workunits/cephtool/test.sh2
-rwxr-xr-xqa/workunits/mon/crush_ops.sh2
-rw-r--r--src/common/options.cc5
-rw-r--r--src/include/ceph_features.h1
-rw-r--r--src/mon/Monitor.cc15
-rw-r--r--src/mon/Monitor.h1
-rw-r--r--src/mon/OSDMonitor.cc40
-rw-r--r--src/mon/mon_types.h7
-rw-r--r--src/osd/OSDMap.cc3
-rw-r--r--src/osd/OSDMap.h3
-rw-r--r--src/test/cli/monmaptool/feature-set-unset-list.t40
12 files changed, 94 insertions, 39 deletions
diff --git a/qa/standalone/mon/misc.sh b/qa/standalone/mon/misc.sh
index 28655dc5468..c03f7df2014 100755
--- a/qa/standalone/mon/misc.sh
+++ b/qa/standalone/mon/misc.sh
@@ -169,7 +169,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-mimic "
+ CEPH_ARGS+="--mon-debug-no-require-nautilus "
run_mon $dir a --public-addr $MONA || return 1
run_mon $dir b --public-addr $MONB || return 1
@@ -180,13 +180,15 @@ 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, and mimic
+ # quorum's monitor features contain kraken, luminous, mimic, and nautilus
jqfilter='.features.quorum_mon[]|select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
jqfilter='.features.quorum_mon[]|select(. == "luminous")'
jq_success "$jqinput" "$jqfilter" "luminous" || return 1
jqfilter='.features.quorum_mon[]|select(. == "mimic")'
jq_success "$jqinput" "$jqfilter" "mimic" || return 1
+ jqfilter='.features.quorum_mon[]|select(. == "nautilus")'
+ jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
# monmap must have no persistent features set, because we
# don't currently have a quorum made out of all the monitors
@@ -201,13 +203,15 @@ function TEST_mon_features() {
# validate 'mon feature ls'
jqinput="$(ceph mon feature ls --format=json 2>/dev/null)"
- # k l m are supported
+ # k l m n are supported
jqfilter='.all.supported[] | select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
jqfilter='.all.supported[] | select(. == "luminous")'
jq_success "$jqinput" "$jqfilter" "luminous" || return 1
jqfilter='.all.supported[] | select(. == "mimic")'
jq_success "$jqinput" "$jqfilter" "mimic" || return 1
+ jqfilter='.all.supported[] | select(. == "nautilus")'
+ jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
# start third monitor
run_mon $dir c --public-addr $MONC || return 1
@@ -230,7 +234,7 @@ function TEST_mon_features() {
# monmap must have not all k l m persistent
# features set.
- jqfilter='.monmap.features.persistent | length == 4'
+ jqfilter='.monmap.features.persistent | length == 5'
jq_success "$jqinput" "$jqfilter" || return 1
jqfilter='.monmap.features.persistent[]|select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
@@ -240,6 +244,8 @@ function TEST_mon_features() {
jq_success "$jqinput" "$jqfilter" "mimic" || return 1
jqfilter='.monmap.features.persistent[]|select(. == "osdmap-prune")'
jq_success "$jqinput" "$jqfilter" "osdmap-prune" || return 1
+ jqfilter='.monmap.features.persistent[]|select(. == "nautilus")'
+ jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
CEPH_ARGS=$CEPH_ARGS_orig
# that's all folks. thank you for tuning in.
diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh
index c92f1c0127d..cb40c715146 100755
--- a/qa/workunits/cephtool/test.sh
+++ b/qa/workunits/cephtool/test.sh
@@ -1468,7 +1468,7 @@ function test_mon_osd()
expect_false ceph osd unset sortbitwise # cannot be unset
expect_false ceph osd set bogus
expect_false ceph osd unset bogus
- ceph osd require-osd-release mimic
+ ceph osd require-osd-release nautilus
# can't lower (or use new command for anything but jewel)
expect_false ceph osd require-osd-release jewel
# these are no-ops but should succeed.
diff --git a/qa/workunits/mon/crush_ops.sh b/qa/workunits/mon/crush_ops.sh
index aa287c79ce3..77cfe10642b 100755
--- a/qa/workunits/mon/crush_ops.sh
+++ b/qa/workunits/mon/crush_ops.sh
@@ -20,7 +20,7 @@ ceph osd crush rule create-simple foo default host
ceph osd crush rule create-simple bar default host
# make sure we're at luminous+ before using crush device classes
-ceph osd require-osd-release mimic
+ceph osd require-osd-release nautilus
ceph osd crush rm-device-class all
ceph osd crush set-device-class ssd osd.0
ceph osd crush set-device-class hdd osd.1
diff --git a/src/common/options.cc b/src/common/options.cc
index c470f0bd95a..1ef819c96b3 100644
--- a/src/common/options.cc
+++ b/src/common/options.cc
@@ -1678,6 +1678,11 @@ std::vector<Option> get_global_options() {
.set_flag(Option::FLAG_CLUSTER_CREATE)
.set_description(""),
+ Option("mon_debug_no_require_nautilus", Option::TYPE_BOOL, Option::LEVEL_DEV)
+ .set_default(false)
+ .set_flag(Option::FLAG_CLUSTER_CREATE)
+ .set_description(""),
+
Option("mon_debug_no_require_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(false)
.set_description(""),
diff --git a/src/include/ceph_features.h b/src/include/ceph_features.h
index a90a9b7a78a..8c1945f0bb2 100644
--- a/src/include/ceph_features.h
+++ b/src/include/ceph_features.h
@@ -232,6 +232,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_OSD_RECOVERY_DELETES | \
CEPH_FEATURE_SERVER_MIMIC | \
CEPH_FEATURE_RECOVERY_RESERVATION_2 | \
+ CEPH_FEATURE_SERVER_NAUTILUS | \
0ULL)
#define CEPH_FEATURES_SUPPORTED_DEFAULT CEPH_FEATURES_ALL
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index d1c84eaf2b5..2a8df86004e 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -388,6 +388,7 @@ CompatSet Monitor::get_supported_features()
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_KRAKEN);
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_LUMINOUS);
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_MIMIC);
+ compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_NAUTILUS);
return compat;
}
@@ -2178,6 +2179,13 @@ void Monitor::apply_monmap_to_compatset_features()
assert(HAVE_FEATURE(quorum_con_features, SERVER_MIMIC));
new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_MIMIC);
}
+ if (monmap_features.contains_all(ceph::features::mon::FEATURE_NAUTILUS)) {
+ assert(ceph::features::mon::get_persistent().contains_all(
+ ceph::features::mon::FEATURE_NAUTILUS));
+ // this feature should only ever be set if the quorum supports it.
+ assert(HAVE_FEATURE(quorum_con_features, SERVER_NAUTILUS));
+ new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_NAUTILUS);
+ }
dout(5) << __func__ << dendl;
_apply_compatset_features(new_features);
@@ -2200,6 +2208,9 @@ void Monitor::calc_quorum_requirements()
if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_MIMIC)) {
required_features |= CEPH_FEATUREMASK_SERVER_MIMIC;
}
+ if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_NAUTILUS)) {
+ required_features |= CEPH_FEATUREMASK_SERVER_NAUTILUS;
+ }
// monmap
if (monmap->get_required_features().contains_all(
@@ -2214,6 +2225,10 @@ void Monitor::calc_quorum_requirements()
ceph::features::mon::FEATURE_MIMIC)) {
required_features |= CEPH_FEATUREMASK_SERVER_MIMIC;
}
+ if (monmap->get_required_features().contains_all(
+ ceph::features::mon::FEATURE_NAUTILUS)) {
+ required_features |= CEPH_FEATUREMASK_SERVER_NAUTILUS;
+ }
dout(10) << __func__ << " required_features " << required_features << dendl;
}
diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h
index 1acf69cc31a..864a8f8289b 100644
--- a/src/mon/Monitor.h
+++ b/src/mon/Monitor.h
@@ -988,6 +988,7 @@ public:
#define CEPH_MON_FEATURE_INCOMPAT_KRAKEN CompatSet::Feature(8, "support monmap features")
#define CEPH_MON_FEATURE_INCOMPAT_LUMINOUS CompatSet::Feature(9, "luminous ondisk layout")
#define CEPH_MON_FEATURE_INCOMPAT_MIMIC CompatSet::Feature(10, "mimic ondisk layout")
+#define CEPH_MON_FEATURE_INCOMPAT_NAUTILUS CompatSet::Feature(11, "nautilus ondisk layout")
// make sure you add your feature to Monitor::get_supported_features
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 01730126aba..58ce4d5162f 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -248,11 +248,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->mon_debug_no_require_mimic) {
- newmap.require_osd_release = CEPH_RELEASE_LUMINOUS;
- derr << __func__ << " mon_debug_no_require_mimic=true" << dendl;
+ if (g_conf->get_val<bool>("mon_debug_no_require_nautilus")) {
+ if (g_conf->mon_debug_no_require_mimic) {
+ derr << __func__ << " mon_debug_no_require_mimic=true and nautilus=true" << dendl;
+ newmap.require_osd_release = CEPH_RELEASE_LUMINOUS;
+ } else {
+ derr << __func__ << " mon_debug_no_require_nautilus=true" << dendl;
+ newmap.require_osd_release = CEPH_RELEASE_MIMIC;
+ }
} else {
- newmap.require_osd_release = CEPH_RELEASE_MIMIC;
+ newmap.require_osd_release = CEPH_RELEASE_NAUTILUS;
int r = ceph_release_from_name(
g_conf->mon_osd_initial_require_min_compat_client.c_str());
if (r <= 0) {
@@ -1176,7 +1181,7 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
// upgrade to mimic?
if (osdmap.require_osd_release < CEPH_RELEASE_MIMIC &&
tmp.require_osd_release >= CEPH_RELEASE_MIMIC) {
- dout(10) << __func__ << " first mimic epoch" << dendl;
+ dout(10) << __func__ << " first mimic+ epoch" << dendl;
// record this epoch as the deletion for all legacy removed_snaps
for (auto& p : tmp.get_pools()) {
// update every pool
@@ -1236,6 +1241,10 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
}
}
}
+ if (osdmap.require_osd_release < CEPH_RELEASE_NAUTILUS &&
+ tmp.require_osd_release >= CEPH_RELEASE_NAUTILUS) {
+ dout(10) << __func__ << " first nautilus+ epoch" << dendl;
+ }
}
// tell me about it
@@ -3944,7 +3953,7 @@ epoch_t OSDMonitor::send_pg_creates(int osd, Connection *con, epoch_t next) cons
// create message handling path in the OSD still does the old thing where
// the pg history is pregenerated and it's instantiated at the latest osdmap
// epoch; child pgs are simply not created.
- bool old = true; // !HAVE_FEATURE(con->get_features(), SERVER_MIMIC);
+ bool old = true; // !HAVE_FEATURE(con->get_features(), SERVER_NAUTILUS);
epoch_t last = 0;
for (auto epoch_pgs = creating_pgs_by_epoch->second.lower_bound(next);
@@ -9602,19 +9611,26 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
goto reply;
}
assert(osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS);
+ if (!osdmap.get_num_up_osds() && sure != "--yes-i-really-mean-it") {
+ 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_MIMIC) {
- if (!osdmap.get_num_up_osds() && sure != "--yes-i-really-mean-it") {
- 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 ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_MIMIC))
&& sure != "--yes-i-really-mean-it") {
ss << "not all up OSDs have CEPH_FEATURE_SERVER_MIMIC feature";
err = -EPERM;
goto reply;
}
+ } else if (rel == CEPH_RELEASE_NAUTILUS) {
+ if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_NAUTILUS))
+ && sure != "--yes-i-really-mean-it") {
+ ss << "not all up OSDs have CEPH_FEATURE_SERVER_NAUTILUS feature";
+ err = -EPERM;
+ goto reply;
+ }
} else {
ss << "not supported for this release yet";
err = -EPERM;
diff --git a/src/mon/mon_types.h b/src/mon/mon_types.h
index 84e715343b4..841353019d8 100644
--- a/src/mon/mon_types.h
+++ b/src/mon/mon_types.h
@@ -494,6 +494,7 @@ namespace ceph {
constexpr mon_feature_t FEATURE_LUMINOUS( (1ULL << 1));
constexpr mon_feature_t FEATURE_MIMIC( (1ULL << 2));
constexpr mon_feature_t FEATURE_OSDMAP_PRUNE (1ULL << 3);
+ constexpr mon_feature_t FEATURE_NAUTILUS( (1ULL << 4));
constexpr mon_feature_t FEATURE_RESERVED( (1ULL << 63));
constexpr mon_feature_t FEATURE_NONE( (0ULL));
@@ -509,6 +510,7 @@ namespace ceph {
FEATURE_LUMINOUS |
FEATURE_MIMIC |
FEATURE_OSDMAP_PRUNE |
+ FEATURE_NAUTILUS |
FEATURE_NONE
);
}
@@ -527,6 +529,7 @@ namespace ceph {
FEATURE_KRAKEN |
FEATURE_LUMINOUS |
FEATURE_MIMIC |
+ FEATURE_NAUTILUS |
FEATURE_OSDMAP_PRUNE |
FEATURE_NONE
);
@@ -555,6 +558,8 @@ static inline const char *ceph::features::mon::get_feature_name(uint64_t b) {
return "mimic";
} else if (f == FEATURE_OSDMAP_PRUNE) {
return "osdmap-prune";
+ } else if (f == FEATURE_NAUTILUS) {
+ return "nautilus";
} else if (f == FEATURE_RESERVED) {
return "reserved";
}
@@ -571,6 +576,8 @@ inline mon_feature_t ceph::features::mon::get_feature_by_name(const std::string
return FEATURE_MIMIC;
} else if (n == "osdmap-prune") {
return FEATURE_OSDMAP_PRUNE;
+ } else if (n == "nautilus") {
+ return FEATURE_NAUTILUS;
} else if (n == "reserved") {
return FEATURE_RESERVED;
}
diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc
index 03e22ccd5ec..b182256253f 100644
--- a/src/osd/OSDMap.cc
+++ b/src/osd/OSDMap.cc
@@ -2383,6 +2383,9 @@ bool OSDMap::primary_changed(
uint64_t OSDMap::get_encoding_features() const
{
uint64_t f = SIGNIFICANT_FEATURES;
+ if (require_osd_release < CEPH_RELEASE_NAUTILUS) {
+ f &= ~CEPH_FEATURE_SERVER_NAUTILUS;
+ }
if (require_osd_release < CEPH_RELEASE_MIMIC) {
f &= ~CEPH_FEATURE_SERVER_MIMIC;
}
diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h
index 791c1a79f5a..c2d83d1773b 100644
--- a/src/osd/OSDMap.h
+++ b/src/osd/OSDMap.h
@@ -520,7 +520,8 @@ private:
CEPH_FEATUREMASK_CRUSH_TUNABLES5 |
CEPH_FEATUREMASK_CRUSH_CHOOSE_ARGS |
CEPH_FEATUREMASK_SERVER_LUMINOUS |
- CEPH_FEATUREMASK_SERVER_MIMIC;
+ CEPH_FEATUREMASK_SERVER_MIMIC |
+ CEPH_FEATUREMASK_SERVER_NAUTILUS;
struct addrs_s {
mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > client_addr;
diff --git a/src/test/cli/monmaptool/feature-set-unset-list.t b/src/test/cli/monmaptool/feature-set-unset-list.t
index 216566ebb48..5aec83ec074 100644
--- a/src/test/cli/monmaptool/feature-set-unset-list.t
+++ b/src/test/cli/monmaptool/feature-set-unset-list.t
@@ -11,21 +11,21 @@
required: [none]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
MONMAP FEATURES:
persistent: [none]
optional: [none]
required: [none]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
monmap:persistent:[none]
monmap:optional:[none]
monmap:required:[none]
- available:supported:[kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- available:persistent:[kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ available:supported:[kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ available:persistent:[kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
$ monmaptool --feature-set foo /tmp/test.monmap.1234
unknown features name 'foo' or unable to parse value: Expected option value to be integer, got 'foo'
@@ -37,7 +37,7 @@
[--feature-unset <value> [--optional|--persistent]] <mapfilename>
[1]
- $ monmaptool --feature-set kraken --feature-set 16 --optional --feature-set 32 --persistent /tmp/test.monmap.1234
+ $ monmaptool --feature-set kraken --feature-set 64 --optional --feature-set 32 --persistent /tmp/test.monmap.1234
monmaptool: monmap file /tmp/test.monmap.1234
monmaptool: writing epoch 0 to /tmp/test.monmap.1234 (1 monitors)
@@ -45,26 +45,26 @@
monmaptool: monmap file /tmp/test.monmap.1234
MONMAP FEATURES:
persistent: [kraken(1),unknown(32)]
- optional: [unknown(16)]
- required: [kraken(1),unknown(16),unknown(32)]
+ optional: [unknown(64)]
+ required: [kraken(1),unknown(32),unknown(64)]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
$ monmaptool --feature-unset 32 --optional --feature-list /tmp/test.monmap.1234
monmaptool: monmap file /tmp/test.monmap.1234
MONMAP FEATURES:
persistent: [kraken(1),unknown(32)]
- optional: [unknown(16)]
- required: [kraken(1),unknown(16),unknown(32)]
+ optional: [unknown(64)]
+ required: [kraken(1),unknown(32),unknown(64)]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
monmaptool: writing epoch 0 to /tmp/test.monmap.1234 (1 monitors)
- $ monmaptool --feature-unset 32 --persistent --feature-unset 16 --optional --feature-list /tmp/test.monmap.1234
+ $ monmaptool --feature-unset 32 --persistent --feature-unset 64 --optional --feature-list /tmp/test.monmap.1234
monmaptool: monmap file /tmp/test.monmap.1234
MONMAP FEATURES:
persistent: [kraken(1)]
@@ -72,8 +72,8 @@
required: [kraken(1)]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
monmaptool: writing epoch 0 to /tmp/test.monmap.1234 (1 monitors)
$ monmaptool --feature-unset kraken --feature-list /tmp/test.monmap.1234
@@ -84,8 +84,8 @@
required: [none]
AVAILABLE FEATURES:
- supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
- persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8)]
+ supported: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
+ persistent: [kraken(1),luminous(2),mimic(4),osdmap-prune(8),nautilus(16)]
monmaptool: writing epoch 0 to /tmp/test.monmap.1234 (1 monitors)
$ rm /tmp/test.monmap.1234