From 7bbc92eda368dc70a421eed600532a165f5aecc1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 27 Jan 2021 15:45:32 -0600 Subject: [PATCH] mon: updates for quincy Signed-off-by: Sage Weil --- doc/dev/release-checklists.rst | 16 ++--- qa/standalone/mon/misc.sh | 16 ++++- qa/workunits/cephtool/test.sh | 6 +- src/common/options.cc | 8 +-- src/mon/MonCommands.h | 2 +- src/mon/OSDMonitor.cc | 118 ++++++++++----------------------- 6 files changed, 63 insertions(+), 103 deletions(-) diff --git a/doc/dev/release-checklists.rst b/doc/dev/release-checklists.rst index 0793469a211d3..b64ea2bb5a4e2 100644 --- a/doc/dev/release-checklists.rst +++ b/doc/dev/release-checklists.rst @@ -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 diff --git a/qa/standalone/mon/misc.sh b/qa/standalone/mon/misc.sh index e5567e7b62d9d..88c2724833e22 100755 --- a/qa/standalone/mon/misc.sh +++ b/qa/standalone/mon/misc.sh @@ -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 p 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. diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 3c1eb36cb21f3..66724c515a30f 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 diff --git a/src/common/options.cc b/src/common/options.cc index 8e15babf9e3ce..d7a143a6d2731 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2132,17 +2132,17 @@ std::vector