]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
hammer-x: test CEPH_FEATURE_HAMMER_0_94_4
authorLoic Dachary <ldachary@redhat.com>
Fri, 11 Sep 2015 14:01:33 +0000 (16:01 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sat, 12 Sep 2015 22:46:03 +0000 (00:46 +0200)
http://tracker.ceph.com/issues/13026 Refs: #13026

Signed-off-by: Loic Dachary <loic@dachary.org>
suites/upgrade/hammer-x/v0-94-4-stop/+ [new file with mode: 0644]
suites/upgrade/hammer-x/v0-94-4-stop/a-supported-distro.yaml [new symlink]
suites/upgrade/hammer-x/v0-94-4-stop/ignore.yaml [new file with mode: 0644]
suites/upgrade/hammer-x/v0-94-4-stop/v0-94-4-stop.yaml [new file with mode: 0644]

diff --git a/suites/upgrade/hammer-x/v0-94-4-stop/+ b/suites/upgrade/hammer-x/v0-94-4-stop/+
new file mode 100644 (file)
index 0000000..e69de29
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 (symlink)
index 0000000..8a61b8b
--- /dev/null
@@ -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 (file)
index 0000000..be2507f
--- /dev/null
@@ -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 (file)
index 0000000..4377198
--- /dev/null
@@ -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]