[sheepdog] [PATCH 1/3] tests: reboot sheepdog without collie shutdown
MORITA Kazutaka
morita.kazutaka at gmail.com
Wed May 15 19:14:57 CEST 2013
From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
The current master can lose objects if we restart sheepdog without
'collie cluster shutdown' several times.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/060 | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/060.out | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/group | 1 +
3 files changed, 153 insertions(+)
create mode 100755 tests/060
create mode 100644 tests/060.out
diff --git a/tests/060 b/tests/060
new file mode 100755
index 0000000..8309619
--- /dev/null
+++ b/tests/060
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Test reboot sheepdog without collie shutdown
+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
+
+for i in `seq 0 3`; do
+ $COLLIE vdi create test$i 100M
+
+ for j in `seq 0 24`; do
+ echo "$i $j" | $COLLIE vdi write test$i $(($j * 4 * 1024 ** 2)) 512
+ done &
+done
+wait
+
+for i in `seq 0 3`; do
+ $COLLIE vdi read test$i | md5sum
+done
+
+_reboot_without_collie_shutdown()
+{
+ local i
+ for i in `seq 1 7`; do
+ _kill_sheep $i
+ done
+
+ _wait_for_sheep 1
+ _kill_sheep 0
+ _wait_for_sheep_stop
+ _start_sheep 0
+
+ for i in `seq 1 7`; do
+ _start_sheep $i
+ done
+ _wait_for_sheep 8
+}
+
+for i in 0 1 2; do
+ _reboot_without_collie_shutdown
+done
+
+for i in `seq 0 7`; do
+ $COLLIE cluster info -p 700$i | _filter_cluster_info > $STORE/cinfo.$i
+ $COLLIE vdi list -p 700$i | _filter_short_date
+ for j in `seq 0 3`; do
+ $COLLIE vdi read test$j -p 700$i | md5sum > $STORE/csum.$i.$j &
+ done
+ wait
+ for j in `seq 0 3`; do
+ cat $STORE/csum.$i.$j
+ done
+done
+
+for i in `seq 1 7`; do
+ diff -u $STORE/cinfo.0 $STORE/cinfo.$i
+done
diff --git a/tests/060.out b/tests/060.out
new file mode 100644
index 0000000..855d926
--- /dev/null
+++ b/tests/060.out
@@ -0,0 +1,78 @@
+QA output created by 060
+using backend farm store
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
+ Name Id Size Used Shared Creation time VDI id Copies Tag
+ test1 0 100 MB 100 MB 0.0 MB DATE fd32fc 3
+ test0 0 100 MB 100 MB 0.0 MB DATE fd34af 3
+ test3 0 100 MB 100 MB 0.0 MB DATE fd3662 3
+ test2 0 100 MB 100 MB 0.0 MB DATE fd3815 3
+fb3833490ceb868a81ab0ba8bda8fdda -
+fee603199c05d11ae60851eb95bbc5fb -
+10040f8a44618b0764c5a73a12f58772 -
+7357bb73af7ab89d0083925863810ee3 -
diff --git a/tests/group b/tests/group
index abef17e..3d7f785 100644
--- a/tests/group
+++ b/tests/group
@@ -73,3 +73,4 @@
057 auto quick cluster md
058 auto quick cluster md
059 auto quick vdi md
+060 auto quick cluster md
--
1.7.9.5
More information about the sheepdog
mailing list