From 5befd50e84614ea24a07b12755eaba441aa3c0a6 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 11 Sep 2015 16:01:33 +0200 Subject: [PATCH] hammer-x: test CEPH_FEATURE_HAMMER_0_94_4 http://tracker.ceph.com/issues/13026 Refs: #13026 Signed-off-by: Loic Dachary --- suites/upgrade/hammer-x/v0-94-4-stop/+ | 0 .../v0-94-4-stop/a-supported-distro.yaml | 1 + .../upgrade/hammer-x/v0-94-4-stop/ignore.yaml | 9 ++ .../hammer-x/v0-94-4-stop/v0-94-4-stop.yaml | 102 ++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 suites/upgrade/hammer-x/v0-94-4-stop/+ create mode 120000 suites/upgrade/hammer-x/v0-94-4-stop/a-supported-distro.yaml create mode 100644 suites/upgrade/hammer-x/v0-94-4-stop/ignore.yaml create mode 100644 suites/upgrade/hammer-x/v0-94-4-stop/v0-94-4-stop.yaml diff --git a/suites/upgrade/hammer-x/v0-94-4-stop/+ b/suites/upgrade/hammer-x/v0-94-4-stop/+ new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/suites/upgrade/hammer-x/v0-94-4-stop/a-supported-distro.yaml b/suites/upgrade/hammer-x/v0-94-4-stop/a-supported-distro.yaml new file mode 120000 index 0000000000000..8a61b8bb1dbcf --- /dev/null +++ b/suites/upgrade/hammer-x/v0-94-4-stop/a-supported-distro.yaml @@ -0,0 +1 @@ +../../../../distros/supported/a-supported-distro.yaml \ No newline at end of file diff --git a/suites/upgrade/hammer-x/v0-94-4-stop/ignore.yaml b/suites/upgrade/hammer-x/v0-94-4-stop/ignore.yaml new file mode 100644 index 0000000000000..be2507f3c72df --- /dev/null +++ b/suites/upgrade/hammer-x/v0-94-4-stop/ignore.yaml @@ -0,0 +1,9 @@ +overrides: + ceph: + log-whitelist: + - scrub mismatch + - ScrubResult + - failed to encode map + conf: + mon: + mon warn on legacy crush tunables: false diff --git a/suites/upgrade/hammer-x/v0-94-4-stop/v0-94-4-stop.yaml b/suites/upgrade/hammer-x/v0-94-4-stop/v0-94-4-stop.yaml new file mode 100644 index 0000000000000..4377198b92a7b --- /dev/null +++ b/suites/upgrade/hammer-x/v0-94-4-stop/v0-94-4-stop.yaml @@ -0,0 +1,102 @@ +# +# Test the expected behavior of the +# +# CEPH_FEATURE_HAMMER_0_94_4 +# +# feature that forbids a cluster with a mix of +# OSD < v0.94.4 and OSD >= v0.94.4 +# +roles: +- - mon.a + - osd.0 + - osd.1 +- - osd.2 +tasks: +- print: "**** Install version lower than v0.94.4" +- install: + tag: v0.94.3 +- ceph: + fs: xfs + +- print: "*** Upgrade the target that runs osd.0 and osd.1 to -x while the target that runs osd.2 stays v0.94.3" +- install.upgrade: + osd.0: + +- print: "*** Restart the mon.a so that it is post-hammer v0.94.4 and implements the CEPH_FEATURE_HAMMER_0_94_4 feature" +- ceph.restart: + daemons: [mon.a] + +- print: "*** Verify that osd.0 cannot restart because osd.1 and osd.2 are still < v0.94.4" +- ceph.restart: + daemons: [osd.0] + wait-for-healthy: false +- exec: + osd.0: + - |- + set -x + success=false + for delay in 1 2 4 8 16 32 64 128 256 512 1024 ; do + if ceph daemon osd.0 log flush ; then + if grep "one or more pre-v0.94.4 hammer" /var/log/ceph/ceph-osd.0.log ; then + success=true + break + fi + fi + sleep $delay + done + $success || exit 1 + +- print: "*** Stop all OSDs and restart osd.0 and osd.1 which are >= v0.94.4" +- ceph.stop: + daemons: [osd.0, osd.1, osd.2] +- exec: + mon.a: + - |- + set -x + ceph osd down osd.0 + ceph osd down osd.1 + ceph osd down osd.2 +- ceph.restart: + daemons: [osd.0, osd.1] + wait-for-healthy: false +- exec: + mon.a: + - |- + set -x + success=false + for delay in 1 2 4 8 16 32 64 128 256 512 1024 ; do + if ceph osd dump | grep 'osd.1 up' && ceph osd dump | grep 'osd.0 up' ; then + success=true + break + fi + ceph osd dump + sleep $delay + done + $success || exit 1 + ceph osd dump | grep 'osd.2 down' || exit 1 + +- print: "*** Verify that osd.2 cannot restart because it is < v0.94.4 and all other OSDs are >= v0.94.4" +- ceph.restart: + daemons: [osd.2] + wait-for-healthy: false +- exec: + mon.a: + - |- + set -x + success=false + for delay in 1 2 4 8 16 32 64 128 256 512 1024 ; do + ceph daemon mon.a log flush + if grep "disallowing boot of pre-hammer v0.94.4 OSD" /var/log/ceph/*.log ; then + success=true + break + fi + sleep $delay + ceph osd dump + done + $success || exit 1 + +- print: "*** Upgrade the target that runs osd.2 to -x and verify the cluster is back to being healthy" +- install.upgrade: + osd.2: +- ceph.restart: + daemons: [osd.2] -- 2.39.5