[sheepdog] [PATCH 1/2] tests: add test to check recovery after many nodes failed
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Sat Aug 25 20:09:50 CEST 2012
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/033 | 59 +++++++++++++++++++++++++++++++++++++++++
tests/033.out | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/group | 1 +
3 files changed, 142 insertions(+), 0 deletions(-)
create mode 100755 tests/033
create mode 100644 tests/033.out
diff --git a/tests/033 b/tests/033
new file mode 100755
index 0000000..9bc3818
--- /dev/null
+++ b/tests/033
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Test recovery after many nodes failed at the same time
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+for i in `seq 0 7`; do
+ _start_sheep $i
+done
+
+_wait_for_sheep 8
+
+$COLLIE cluster format
+
+$COLLIE vdi create test 100MB
+# create 25 objects
+for i in `seq 0 24`; do
+ echo $i | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+$COLLIE vdi read test | md5sum
+
+# kill 7 nodes without waiting to finish recovery
+for i in `seq 7 -1 1`; do
+ _kill_sheep $i
+done
+
+# make sheep 0 master to avoid master transfer
+sleep 1
+_kill_sheep 0
+
+sleep 1
+
+# start master first
+_start_sheep 0
+_wait_for_sheep 1
+for i in `seq 0 7`; do
+ _start_sheep $i
+done
+
+_wait_for_sheep_recovery 0
+
+ls $STORE/*/obj/807c2b2500000000 | sort
+for i in `seq 0 24`; do
+ ls $STORE/*/obj/007c2b25000000`printf "%02x" $i` | sort
+done
+
+$COLLIE vdi read test | md5sum
diff --git a/tests/033.out b/tests/033.out
new file mode 100644
index 0000000..656ca1e
--- /dev/null
+++ b/tests/033.out
@@ -0,0 +1,82 @@
+QA output created by 033
+using backend farm store
+9c7766570b3be3aff2724f587c2f4107 -
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/6/obj/007c2b2500000003
+/tmp/sheepdog/7/obj/007c2b2500000003
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/5/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
+/tmp/sheepdog/5/obj/007c2b2500000006
+/tmp/sheepdog/7/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/5/obj/007c2b2500000007
+/tmp/sheepdog/7/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/007c2b2500000008
+/tmp/sheepdog/3/obj/007c2b2500000008
+/tmp/sheepdog/6/obj/007c2b2500000008
+/tmp/sheepdog/3/obj/007c2b2500000009
+/tmp/sheepdog/5/obj/007c2b2500000009
+/tmp/sheepdog/7/obj/007c2b2500000009
+/tmp/sheepdog/0/obj/007c2b250000000a
+/tmp/sheepdog/2/obj/007c2b250000000a
+/tmp/sheepdog/5/obj/007c2b250000000a
+/tmp/sheepdog/1/obj/007c2b250000000b
+/tmp/sheepdog/4/obj/007c2b250000000b
+/tmp/sheepdog/5/obj/007c2b250000000b
+/tmp/sheepdog/3/obj/007c2b250000000c
+/tmp/sheepdog/4/obj/007c2b250000000c
+/tmp/sheepdog/5/obj/007c2b250000000c
+/tmp/sheepdog/0/obj/007c2b250000000d
+/tmp/sheepdog/2/obj/007c2b250000000d
+/tmp/sheepdog/3/obj/007c2b250000000d
+/tmp/sheepdog/1/obj/007c2b250000000e
+/tmp/sheepdog/3/obj/007c2b250000000e
+/tmp/sheepdog/7/obj/007c2b250000000e
+/tmp/sheepdog/2/obj/007c2b250000000f
+/tmp/sheepdog/4/obj/007c2b250000000f
+/tmp/sheepdog/5/obj/007c2b250000000f
+/tmp/sheepdog/0/obj/007c2b2500000010
+/tmp/sheepdog/1/obj/007c2b2500000010
+/tmp/sheepdog/4/obj/007c2b2500000010
+/tmp/sheepdog/3/obj/007c2b2500000011
+/tmp/sheepdog/5/obj/007c2b2500000011
+/tmp/sheepdog/7/obj/007c2b2500000011
+/tmp/sheepdog/2/obj/007c2b2500000012
+/tmp/sheepdog/4/obj/007c2b2500000012
+/tmp/sheepdog/6/obj/007c2b2500000012
+/tmp/sheepdog/0/obj/007c2b2500000013
+/tmp/sheepdog/5/obj/007c2b2500000013
+/tmp/sheepdog/6/obj/007c2b2500000013
+/tmp/sheepdog/0/obj/007c2b2500000014
+/tmp/sheepdog/5/obj/007c2b2500000014
+/tmp/sheepdog/6/obj/007c2b2500000014
+/tmp/sheepdog/0/obj/007c2b2500000015
+/tmp/sheepdog/2/obj/007c2b2500000015
+/tmp/sheepdog/3/obj/007c2b2500000015
+/tmp/sheepdog/1/obj/007c2b2500000016
+/tmp/sheepdog/5/obj/007c2b2500000016
+/tmp/sheepdog/6/obj/007c2b2500000016
+/tmp/sheepdog/2/obj/007c2b2500000017
+/tmp/sheepdog/5/obj/007c2b2500000017
+/tmp/sheepdog/6/obj/007c2b2500000017
+/tmp/sheepdog/0/obj/007c2b2500000018
+/tmp/sheepdog/1/obj/007c2b2500000018
+/tmp/sheepdog/5/obj/007c2b2500000018
+9c7766570b3be3aff2724f587c2f4107 -
diff --git a/tests/group b/tests/group
index 6e988bf..d6a642b 100644
--- a/tests/group
+++ b/tests/group
@@ -44,3 +44,4 @@
030 auto quick store
031 auto quick vdi
032 auto quick store
+033 auto quick store
--
1.7.2.5
More information about the sheepdog
mailing list