Skip to content

Commit

Permalink
Merge PR ceph#27141 into master
Browse files Browse the repository at this point in the history
* refs/pull/27141/head:
	mon/OSDMonitor: fix osd boot feature vs require_osd_release check
	include/ceph_features: retire 7 other old features
	include/ceph_features: retire ERASURE_CODE_PLUGINS_V2
	include/ceph_features: retire OSD_ERASURE_CODES
	include/ceph_features: update comment to align with N+2 upgrades
	include/ceph_features: adjust whitespace for retired and now usable features
	mon: remove check for jewel mons
	mds/FSMap: remove support for encoding jewel FSMap
	include/ceph_features: enable SERVER_OCTOPUS
	test/cli/osdmaptool/feature-set-unset-list: add octopus to output
	test/cli/osdmaptool/feature-set-unset-list: change unknown feature bit
	qa/releases/octopus.yaml: add octopus upgrade final step
	osd/OSDMap: octopus encoding features
	mon/OSDMonitor: add mon_debug_no_require_octopus
	mon/OSDMonitor: allow 'osd require-osd-release octopus'
	mon: add ondisk incompat octopus feature
	mon/mon_types: add mon feature for octopus
	include/ceph_features: SERVER_O -> SERVER_OCTOPUS

Reviewed-by: Neha Ojha <[email protected]>
  • Loading branch information
liewegas committed Apr 3, 2019
2 parents 1e76299 + 1a68976 commit 3c9db39
Show file tree
Hide file tree
Showing 16 changed files with 150 additions and 139 deletions.
6 changes: 6 additions & 0 deletions qa/releases/octopus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tasks:
- exec:
osd.0:
- ceph osd require-osd-release octopus
- ceph osd set-require-min-compat-client octopus
- ceph.healthy:
4 changes: 3 additions & 1 deletion qa/standalone/mon/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function TEST_mon_features() {

# monmap must have not all k l m persistent
# features set.
jqfilter='.monmap.features.persistent | length == 5'
jqfilter='.monmap.features.persistent | length == 6'
jq_success "$jqinput" "$jqfilter" || return 1
jqfilter='.monmap.features.persistent[]|select(. == "kraken")'
jq_success "$jqinput" "$jqfilter" "kraken" || return 1
Expand All @@ -249,6 +249,8 @@ function TEST_mon_features() {
jq_success "$jqinput" "$jqfilter" "osdmap-prune" || return 1
jqfilter='.monmap.features.persistent[]|select(. == "nautilus")'
jq_success "$jqinput" "$jqfilter" "nautilus" || return 1
jqfilter='.monmap.features.persistent[]|select(. == "octopus")'
jq_success "$jqinput" "$jqfilter" "octopus" || return 1

CEPH_ARGS=$CEPH_ARGS_orig
# that's all folks. thank you for tuning in.
Expand Down
4 changes: 2 additions & 2 deletions qa/standalone/mon/msgr-v2-transition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
function TEST_mon_v1_osd_addrs() {
local dir=$1

export CEPH_ARGS="$CEPH_ARGS --mon-host=$CEPH_MON_V1 --mon-debug-no-require-nautilus"
export CEPH_ARGS="$CEPH_ARGS --mon-host=$CEPH_MON_V1 --mon-debug-no-require-octopus --mon-debug-no-require-nautilus"
run_mon $dir a || return 1

ceph mon dump | grep mon.a | grep $CEPH_MON_V1
Expand Down Expand Up @@ -58,7 +58,7 @@ function TEST_mon_v1_osd_addrs() {
function TEST_mon_v2v1_osd_addrs() {
local dir=$1

export CEPH_ARGS="$CEPH_ARGS --mon-host=[$CEPH_MON_V2,$CEPH_MON_V1] --mon-debug-no-require-nautilus"
export CEPH_ARGS="$CEPH_ARGS --mon-host=[$CEPH_MON_V2,$CEPH_MON_V1] --mon-debug-no-require-octopus --mon-debug-no-require-nautilus"
run_mon $dir a || return 1

ceph mon dump | grep mon.a | grep $CEPH_MON_V1
Expand Down
8 changes: 5 additions & 3 deletions qa/workunits/cephtool/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1488,9 +1488,11 @@ function test_mon_osd()
expect_false ceph osd set $f
expect_false ceph osd unset $f
done
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
ceph osd require-osd-release octopus
# can't lower
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
Expand Down
2 changes: 0 additions & 2 deletions qa/workunits/mon/crush_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ ceph osd crush rule create-simple foo default host
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 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
Expand Down
6 changes: 6 additions & 0 deletions src/common/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,12 @@ std::vector<Option> get_global_options() {
.set_flag(Option::FLAG_CLUSTER_CREATE)
.set_description("do not set nautilus feature for new mon clusters"),

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 octopus feature for new mon clusters"),

Option("mon_debug_no_require_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(false)
.add_service("mon")
Expand Down
60 changes: 28 additions & 32 deletions src/include/ceph_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,29 @@
/*
* Notes on deprecation:
*
* A *major* release is a release through which all upgrades must pass
* (e.g., jewel). For example, no pre-jewel server will ever talk to
* a post-jewel server (mon, osd, etc).
*
* For feature bits used *only* on the server-side:
*
* - In the first phase we indicate that a feature is DEPRECATED as of
* a particular release. This is the first major release X (say,
* jewel) that does not depend on its peers advertising the feature.
* mimic) that does not depend on its peers advertising the feature.
* That is, it safely assumes its peers all have the feature. We
* indicate this with the DEPRECATED macro. For example,
*
* DEFINE_CEPH_FEATURE_DEPRECATED( 2, 1, MONCLOCKCHECK, JEWEL)
* DEFINE_CEPH_FEATURE_DEPRECATED( 2, 1, MON_METADATA, MIMIC)
*
* because 10.2.z (jewel) did not care if its peers advertised this
* because 13.2.z (mimic) did not care if its peers advertised this
* feature bit.
*
* - In the second phase we stop advertising the the bit and call it
* RETIRED. This can normally be done in the *next* major release
* RETIRED. This can normally be done 2 major releases
* following the one in which we marked the feature DEPRECATED. In
* the above example, for 12.0.z (luminous) we can say:
* the above example, for 15.0.z (octopus) we can say:
*
* DEFINE_CEPH_FEATURE_RETIRED( 2, 1, MONCLOCKCHECK, JEWEL, LUMINOUS)
* DEFINE_CEPH_FEATURE_RETIRED( 2, 1, MON_METADATA, MIMIC, OCTOPUS)
*
* - The bit can be reused in the first post-luminous release, 13.0.z
* (m).
* - The bit can be reused in the next release that will never talk to
* a pre-octopus daemon (13 mimic or 14 nautlius) that advertises the
* bit: in this case, the 16.y.z (P-release).
*
* This ensures that no two versions who have different meanings for
* the bit ever speak to each other.
Expand All @@ -86,6 +83,7 @@
DEFINE_CEPH_FEATURE( 0, 1, UID)
DEFINE_CEPH_FEATURE( 1, 1, NOSRCADDR) // 2.6.35 req
DEFINE_CEPH_FEATURE_RETIRED( 2, 1, MONCLOCKCHECK, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE( 2, 3, SERVER_NAUTILUS)
DEFINE_CEPH_FEATURE( 3, 1, FLOCK) // 2.6.36
DEFINE_CEPH_FEATURE( 4, 1, SUBSCRIBE2) // 4.6 req
Expand All @@ -99,19 +97,22 @@ DEFINE_CEPH_FEATURE(11, 1, PGPOOL3) // 3.9 req
DEFINE_CEPH_FEATURE(12, 1, OSDREPLYMUX)
DEFINE_CEPH_FEATURE(13, 1, OSDENC) // 3.9 req
DEFINE_CEPH_FEATURE_RETIRED(14, 1, OMAP, HAMMER, JEWEL)

DEFINE_CEPH_FEATURE(14, 2, SERVER_KRAKEN)
DEFINE_CEPH_FEATURE(15, 1, MONENC)
DEFINE_CEPH_FEATURE_RETIRED(16, 1, QUERY_T, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE(16, 3, SERVER_O)

DEFINE_CEPH_FEATURE(16, 3, SERVER_OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(17, 1, INDEP_PG_MAP, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE(17, 3, OS_PERF_STAT_NS)
DEFINE_CEPH_FEATURE(18, 1, CRUSH_TUNABLES) // 3.6
DEFINE_CEPH_FEATURE_RETIRED(19, 1, CHUNKY_SCRUB, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE(19, 2, OSD_PGLOG_HARDLIMIT)

DEFINE_CEPH_FEATURE_RETIRED(20, 1, MON_NULLROUTE, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE_RETIRED(21, 1, MON_GV, HAMMER, JEWEL)

DEFINE_CEPH_FEATURE(21, 2, SERVER_LUMINOUS) // 4.13
DEFINE_CEPH_FEATURE(21, 2, RESEND_ON_SPLIT) // overlap
DEFINE_CEPH_FEATURE(21, 2, RADOS_BACKOFF) // overlap
Expand All @@ -121,11 +122,13 @@ DEFINE_CEPH_FEATURE_RETIRED(22, 1, BACKFILL_RESERVATION, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE(23, 1, MSG_AUTH) // 3.19 req (unless nocephx_require_signatures)
DEFINE_CEPH_FEATURE_RETIRED(24, 1, RECOVERY_RESERVATION, JEWEL, LUNINOUS)

DEFINE_CEPH_FEATURE(24, 2, RECOVERY_RESERVATION_2)
DEFINE_CEPH_FEATURE(25, 1, CRUSH_TUNABLES2) // 3.9
DEFINE_CEPH_FEATURE(26, 1, CREATEPOOLID)
DEFINE_CEPH_FEATURE(27, 1, REPLY_CREATE_INODE) // 3.9
DEFINE_CEPH_FEATURE_RETIRED(28, 1, OSD_HBMSGS, HAMMER, JEWEL)

DEFINE_CEPH_FEATURE(28, 2, SERVER_MIMIC)
DEFINE_CEPH_FEATURE(29, 1, MDSENC) // 4.7
DEFINE_CEPH_FEATURE(30, 1, OSDHASHPSPOOL) // 3.9
Expand All @@ -139,14 +142,14 @@ DEFINE_CEPH_FEATURE_RETIRED(34, 1, OSD_PACKED_RECOVERY, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE(35, 1, OSD_CACHEPOOL) // 3.14
DEFINE_CEPH_FEATURE(36, 1, CRUSH_V2) // 3.14
DEFINE_CEPH_FEATURE(37, 1, EXPORT_PEER) // 3.14
DEFINE_CEPH_FEATURE_DEPRECATED(38, 1, OSD_ERASURE_CODES, MIMIC)
DEFINE_CEPH_FEATURE_RETIRED(38, 1, OSD_ERASURE_CODES, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE(39, 1, OSDMAP_ENC) // 3.15
DEFINE_CEPH_FEATURE(40, 1, MDS_INLINE_DATA) // 3.19
DEFINE_CEPH_FEATURE(41, 1, CRUSH_TUNABLES3) // 3.15
DEFINE_CEPH_FEATURE(41, 1, OSD_PRIMARY_AFFINITY) // overlap
DEFINE_CEPH_FEATURE(42, 1, MSGR_KEEPALIVE2) // 4.3 (for consistency)
DEFINE_CEPH_FEATURE(43, 1, OSD_POOLRESEND) // 4.13
DEFINE_CEPH_FEATURE_DEPRECATED(44, 1, ERASURE_CODE_PLUGINS_V2, MIMIC)
DEFINE_CEPH_FEATURE_RETIRED(44, 1, ERASURE_CODE_PLUGINS_V2, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(45, 1, OSD_SET_ALLOC_HINT, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE(46, 1, OSD_FADVISE_FLAGS)
Expand All @@ -159,15 +162,16 @@ DEFINE_CEPH_FEATURE(48, 1, CRUSH_V4) // 4.1
DEFINE_CEPH_FEATURE_RETIRED(49, 1, OSD_MIN_SIZE_RECOVERY, JEWEL, LUMINOUS)
DEFINE_CEPH_FEATURE_RETIRED(49, 1, OSD_PROXY_FEATURES, JEWEL, LUMINOUS) // overlap

DEFINE_CEPH_FEATURE_DEPRECATED(50, 1, MON_METADATA, MIMIC)
DEFINE_CEPH_FEATURE_DEPRECATED(51, 1, OSD_BITWISE_HOBJ_SORT, MIMIC)
DEFINE_CEPH_FEATURE_DEPRECATED(52, 1, OSD_PROXY_WRITE_FEATURES, MIMIC)
DEFINE_CEPH_FEATURE_DEPRECATED(53, 1, ERASURE_CODE_PLUGINS_V3, MIMIC)
DEFINE_CEPH_FEATURE_DEPRECATED(54, 1, OSD_HITSET_GMT, MIMIC)
DEFINE_CEPH_FEATURE_DEPRECATED(55, 1, HAMMER_0_94_4, MIMIC)
DEFINE_CEPH_FEATURE_RETIRED(50, 1, MON_METADATA, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(51, 1, OSD_BITWISE_HOBJ_SORT, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(52, 1, OSD_PROXY_WRITE_FEATURES, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(53, 1, ERASURE_CODE_PLUGINS_V3, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(54, 1, OSD_HITSET_GMT, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE_RETIRED(55, 1, HAMMER_0_94_4, MIMIC, OCTOPUS)

DEFINE_CEPH_FEATURE(56, 1, NEW_OSDOP_ENCODING) // 4.13 (for pg_pool_t >= v25)
DEFINE_CEPH_FEATURE(57, 1, MON_STATEFUL_SUB) // 4.13
DEFINE_CEPH_FEATURE_DEPRECATED(57, 1, MON_ROUTE_OSDMAP, MIMIC) // overlap
DEFINE_CEPH_FEATURE_RETIRED(57, 1, MON_ROUTE_OSDMAP, MIMIC, OCTOPUS) // overlap
DEFINE_CEPH_FEATURE(57, 1, SERVER_JEWEL) // overlap
DEFINE_CEPH_FEATURE(58, 1, CRUSH_TUNABLES5) // 4.5
DEFINE_CEPH_FEATURE(58, 1, NEW_OSDOPREPLY_ENCODING) // overlap
Expand Down Expand Up @@ -213,25 +217,16 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_OSD_CACHEPOOL | \
CEPH_FEATURE_CRUSH_V2 | \
CEPH_FEATURE_EXPORT_PEER | \
DEPRECATED_CEPH_FEATURE_OSD_ERASURE_CODES | \
CEPH_FEATURE_OSDMAP_ENC | \
CEPH_FEATURE_MDS_INLINE_DATA | \
CEPH_FEATURE_CRUSH_TUNABLES3 | \
CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
CEPH_FEATURE_MSGR_KEEPALIVE2 | \
CEPH_FEATURE_OSD_POOLRESEND | \
DEPRECATED_CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 | \
CEPH_FEATURE_OSD_FADVISE_FLAGS | \
CEPH_FEATURE_MDS_QUOTA | \
CEPH_FEATURE_CRUSH_V4 | \
DEPRECATED_CEPH_FEATURE_MON_METADATA | \
DEPRECATED_CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT | \
DEPRECATED_CEPH_FEATURE_ERASURE_CODE_PLUGINS_V3 | \
DEPRECATED_CEPH_FEATURE_OSD_PROXY_WRITE_FEATURES | \
DEPRECATED_CEPH_FEATURE_OSD_HITSET_GMT | \
DEPRECATED_CEPH_FEATURE_HAMMER_0_94_4 | \
CEPH_FEATURE_MON_STATEFUL_SUB | \
DEPRECATED_CEPH_FEATURE_MON_ROUTE_OSDMAP | \
CEPH_FEATURE_CRUSH_TUNABLES5 | \
CEPH_FEATURE_SERVER_JEWEL | \
CEPH_FEATURE_FS_FILE_LAYOUT_V2 | \
Expand All @@ -248,6 +243,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_SERVER_NAUTILUS | \
CEPH_FEATURE_CEPHX_V2 | \
CEPH_FEATURE_OSD_PGLOG_HARDLIMIT | \
CEPH_FEATUREMASK_SERVER_OCTOPUS | \
0ULL)

#define CEPH_FEATURES_SUPPORTED_DEFAULT CEPH_FEATURES_ALL
Expand Down
80 changes: 21 additions & 59 deletions src/mds/FSMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,10 @@ Filesystem::ref FSMap::create_filesystem(std::string_view name,
fs->mds_map.created = ceph_clock_now();
fs->mds_map.modified = ceph_clock_now();
fs->mds_map.enabled = true;
if (features & CEPH_FEATURE_SERVER_JEWEL) {
fs->fscid = next_filesystem_id++;
// ANONYMOUS is only for upgrades from legacy mdsmaps, we should
// have initialized next_filesystem_id such that it's never used here.
ceph_assert(fs->fscid != FS_CLUSTER_ID_ANONYMOUS);
} else {
// Use anon fscid because this will get thrown away when encoding
// as legacy MDSMap for legacy mons.
ceph_assert(filesystems.empty());
fs->fscid = FS_CLUSTER_ID_ANONYMOUS;
}
fs->fscid = next_filesystem_id++;
// ANONYMOUS is only for upgrades from legacy mdsmaps, we should
// have initialized next_filesystem_id such that it's never used here.
ceph_assert(fs->fscid != FS_CLUSTER_ID_ANONYMOUS);
filesystems[fs->fscid] = fs;

// Created first filesystem? Set it as the one
Expand Down Expand Up @@ -418,54 +411,23 @@ void FSMap::get_health_checks(health_check_map_t *checks) const

void FSMap::encode(bufferlist& bl, uint64_t features) const
{
if (features & CEPH_FEATURE_SERVER_JEWEL) {
ENCODE_START(7, 6, bl);
encode(epoch, bl);
encode(next_filesystem_id, bl);
encode(legacy_client_fscid, bl);
encode(compat, bl);
encode(enable_multiple, bl);
{
std::vector<Filesystem::ref> v;
v.reserve(filesystems.size());
for (auto& p : filesystems) v.emplace_back(p.second);
encode(v, bl, features);
}
encode(mds_roles, bl);
encode(standby_daemons, bl, features);
encode(standby_epochs, bl);
encode(ever_enabled_multiple, bl);
ENCODE_FINISH(bl);
} else {
if (filesystems.empty()) {
MDSMap disabled_map;
disabled_map.epoch = epoch;
disabled_map.encode(bl, features);
} else {
// MDSMonitor should never have created multiple filesystems
// until the quorum features indicated Jewel
ceph_assert(filesystems.size() == 1);
auto fs = filesystems.begin()->second;

// Take the MDSMap for the enabled filesystem, and populated its
// mds_info with the standbys to get a pre-jewel-style mon MDSMap.
MDSMap full_mdsmap = fs->mds_map;
full_mdsmap.epoch = epoch;
for (const auto &p : standby_daemons) {
full_mdsmap.mds_info[p.first] = p.second;
}

// Old MDSMaps don't set rank on standby replay daemons
for (auto &i : full_mdsmap.mds_info) {
auto &info = i.second;
if (info.state == MDSMap::STATE_STANDBY_REPLAY) {
info.rank = MDS_RANK_NONE;
}
}

full_mdsmap.encode(bl, features);
}
}
ENCODE_START(7, 6, bl);
encode(epoch, bl);
encode(next_filesystem_id, bl);
encode(legacy_client_fscid, bl);
encode(compat, bl);
encode(enable_multiple, bl);
{
std::vector<Filesystem::ref> v;
v.reserve(filesystems.size());
for (auto& p : filesystems) v.emplace_back(p.second);
encode(v, bl, features);
}
encode(mds_roles, bl);
encode(standby_daemons, bl, features);
encode(standby_epochs, bl);
encode(ever_enabled_multiple, bl);
ENCODE_FINISH(bl);
}

void FSMap::decode(bufferlist::const_iterator& p)
Expand Down
5 changes: 0 additions & 5 deletions src/mon/FSCommands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ class FlagSetHandler : public FileSystemCommandHandler
return r;
}

bool jewel = mon->get_quorum_con_features() & CEPH_FEATURE_SERVER_JEWEL;
if (flag_bool && !jewel) {
ss << "Multiple-filesystems are forbidden until all mons are updated";
return -EINVAL;
}
if (!sure) {
ss << EXPERIMENTAL_WARNING;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mon/MonCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ COMMAND("osd unset " \
"notieragent|nosnaptrim", \
"unset <key>", "osd", "rw")
COMMAND("osd require-osd-release "\
"name=release,type=CephChoices,strings=luminous|mimic|nautilus " \
"name=release,type=CephChoices,strings=luminous|mimic|nautilus|octopus " \
"name=yes_i_really_mean_it,type=CephBool,req=false", \
"set the minimum allowed OSD release to participate in the cluster",
"osd", "rw")
Expand Down
11 changes: 11 additions & 0 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ CompatSet Monitor::get_supported_features()
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_LUMINOUS);
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_MIMIC);
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_NAUTILUS);
compat.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OCTOPUS);
return compat;
}

Expand Down Expand Up @@ -2392,6 +2393,13 @@ void Monitor::apply_monmap_to_compatset_features()
ceph_assert(HAVE_FEATURE(quorum_con_features, SERVER_NAUTILUS));
new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_NAUTILUS);
}
if (monmap_features.contains_all(ceph::features::mon::FEATURE_OCTOPUS)) {
ceph_assert(ceph::features::mon::get_persistent().contains_all(
ceph::features::mon::FEATURE_OCTOPUS));
// this feature should only ever be set if the quorum supports it.
ceph_assert(HAVE_FEATURE(quorum_con_features, SERVER_OCTOPUS));
new_features.incompat.insert(CEPH_MON_FEATURE_INCOMPAT_OCTOPUS);
}

dout(5) << __func__ << dendl;
_apply_compatset_features(new_features);
Expand All @@ -2418,6 +2426,9 @@ void Monitor::calc_quorum_requirements()
required_features |= CEPH_FEATUREMASK_SERVER_NAUTILUS |
CEPH_FEATUREMASK_CEPHX_V2;
}
if (features.incompat.contains(CEPH_MON_FEATURE_INCOMPAT_OCTOPUS)) {
required_features |= CEPH_FEATUREMASK_SERVER_OCTOPUS;
}

// monmap
if (monmap->get_required_features().contains_all(
Expand Down
1 change: 1 addition & 0 deletions src/mon/Monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ class Monitor : public Dispatcher,
#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")
#define CEPH_MON_FEATURE_INCOMPAT_OCTOPUS CompatSet::Feature(11, "octopus ondisk layout")
// make sure you add your feature to Monitor::get_supported_features


Expand Down
Loading

0 comments on commit 3c9db39

Please sign in to comment.