]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/suites/rados, qa/workunits/rados: Add suite/workunit for ceph-crash 23240/head
authorDan Mick <dan.mick@redhat.com>
Fri, 3 Aug 2018 03:20:41 +0000 (20:20 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 13 Aug 2018 20:53:26 +0000 (13:53 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
qa/suites/rados/singleton/all/test-crash.yaml [new file with mode: 0644]
qa/workunits/rados/test_crash.sh [new file with mode: 0755]

diff --git a/qa/suites/rados/singleton/all/test-crash.yaml b/qa/suites/rados/singleton/all/test-crash.yaml
new file mode 100644 (file)
index 0000000..6dbffb4
--- /dev/null
@@ -0,0 +1,14 @@
+roles:
+  - [client.0, mon.a, mgr.x, osd.0, osd.1, osd.2]
+
+tasks:
+  - install:
+  - ceph:
+      log-whitelist:
+        - Reduced data availability
+        - OSD_.*DOWN
+  - workunit:
+      clients:
+         client.0:
+           - rados/test_crash.sh
+  - ceph.restart: [osd.*]
diff --git a/qa/workunits/rados/test_crash.sh b/qa/workunits/rados/test_crash.sh
new file mode 100755 (executable)
index 0000000..6e7aaaa
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -x
+
+# run on a single-node three-OSD cluster
+
+sudo killall -ABRT ceph-osd
+sleep 5
+
+# kill caused coredumps; find them and delete them, carefully, so as
+# not to disturb other coredumps, or else teuthology will see them
+# and assume test failure.  sudos are because the core files are
+# root/600
+for f in $(find $TESTDIR/archive/coredump -type f); do
+       gdb_output=$(echo "quit" | sudo gdb /usr/bin/ceph-osd $f)
+       if expr match "$gdb_output" ".*generated.*ceph-osd.*" && \
+          ( \
+
+               expr match "$gdb_output" ".*terminated.*signal 6.*" || \
+               expr match "$gdb_output" ".*terminated.*signal SIGABRT.*" \
+          )
+       then
+               sudo rm $f
+       fi
+done
+
+# let daemon find crashdumps on startup
+sudo systemctl restart ceph-crash
+sleep 30
+
+# must be 3 crashdumps registered and moved to crash/posted
+[ $(ceph crash ls | wc -l) = 3 ]  || exit 1
+[ $(sudo find /var/lib/ceph/crash/posted/ -name meta | wc -l) = 3 ] || exit 1