]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/crash_bdev: simple script to inject bdev failures
authorSage Weil <sage@redhat.com>
Mon, 21 Dec 2015 18:54:35 +0000 (13:54 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:19 +0000 (13:07 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/script/crash_bdev.sh [new file with mode: 0755]

diff --git a/src/script/crash_bdev.sh b/src/script/crash_bdev.sh
new file mode 100755 (executable)
index 0000000..40b5038
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -ex
+
+while true; do
+    ./ceph daemon osd.0 config set bdev_inject_crash 2
+    sleep 5
+    tail -n 1000 out/osd.0.log | grep bdev_inject_crash || exit 1
+    ./init-ceph start osd.0
+    sleep 20
+done