[sheepdog] [PATCH 4/4] tests: rewrite 010 to test new manual recovery
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Tue Sep 11 10:25:32 CEST 2012
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
tests/010 | 61 +++++++++++---
tests/010.out | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 295 insertions(+), 16 deletions(-)
diff --git a/tests/010 b/tests/010
index c3f53b4..2c492b1 100755
--- a/tests/010
+++ b/tests/010
@@ -15,28 +15,65 @@ status=1 # failure is the default!
_cleanup
-for i in `seq 0 1`; do _start_sheep $i; done
+for i in `seq 0 4`; do
+ _start_sheep $i
+done
-_wait_for_sheep 2
+_wait_for_sheep 5
-$COLLIE cluster format -c 2
+$COLLIE cluster format
$COLLIE cluster recover disable
$COLLIE vdi create test 4G
-# create 20 objects
-for i in `seq 0 19`; do
- $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512 < /dev/zero
+# create 8 objects
+for i in `seq 0 7`; do
+ echo $i | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+ls $STORE/*/obj/* | sort
+
+_kill_sheep 3
+_kill_sheep 4
+
+sleep 2
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
+
+# overwrite the objects to invoke object recovery
+for i in `seq 4 7`; do
+ $COLLIE vdi read test $((i * 4 * 1024 * 1024)) 512 | md5sum
+ echo $(($i + 100)) | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
+done
+
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
+
+$COLLIE cluster recover enable
+_wait_for_sheep_recovery 0
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
+
+$COLLIE cluster recover disable
+for i in `seq 3 7`; do
+ _start_sheep $i
done
-_start_sheep 2
+_wait_for_sheep 8
+sleep 2
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
-# overwrite the objects
-for i in `seq 0 19`; do
- $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512 < /dev/zero
+# overwrite the objects to invoke object recovery
+for i in `seq 0 3`; do
+ $COLLIE vdi read test $((i * 4 * 1024 * 1024)) 512 -p 7007 | md5sum
+ echo $(($i + 200)) | $COLLIE vdi write test $((i * 4 * 1024 * 1024)) 512
done
-$COLLIE cluster info | _filter_cluster_info
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
$COLLIE cluster recover enable
-$COLLIE cluster info | _filter_cluster_info
+_wait_for_sheep_recovery 0
+$COLLIE cluster info | head -6 | _filter_cluster_info
+ls $STORE/*/obj/* | sort
diff --git a/tests/010.out b/tests/010.out
index ea84c35..61b23b9 100644
--- a/tests/010.out
+++ b/tests/010.out
@@ -1,18 +1,260 @@
QA output created by 010
using backend farm store
-*Note*: Only disable the recovery caused by JOIN envets
Cluster recovery: disable
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000003
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
Cluster status: running
Cluster created at DATE
Epoch Time Version
-DATE 1 [127.0.0.1:7000, 127.0.0.1:7001]
+DATE 3 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000003
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
+a8775e30ddc5eda14d76e5361a514392 -
+8124234db4755d4772c3440f2cbd1ecb -
+62630992718e77c73873ce1672d80786 -
+19b9d4d75a5a71bfad364628880fa913 -
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 3 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000006
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/007c2b2500000004
+/tmp/sheepdog/1/obj/007c2b2500000005
+/tmp/sheepdog/1/obj/007c2b2500000006
+/tmp/sheepdog/1/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000004
+/tmp/sheepdog/2/obj/007c2b2500000005
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000003
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
+Cluster recovery: enable
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 3 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000003
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000006
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/007c2b2500000004
+/tmp/sheepdog/1/obj/007c2b2500000005
+/tmp/sheepdog/1/obj/007c2b2500000006
+/tmp/sheepdog/1/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000001
+/tmp/sheepdog/2/obj/007c2b2500000002
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000004
+/tmp/sheepdog/2/obj/007c2b2500000005
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000006
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000003
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000005
+/tmp/sheepdog/4/obj/007c2b2500000006
+Cluster recovery: disable
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 8 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003, 127.0.0.1:7004, 127.0.0.1:7005, 127.0.0.1:7006, 127.0.0.1:7007]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000003
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000006
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/007c2b2500000004
+/tmp/sheepdog/1/obj/007c2b2500000005
+/tmp/sheepdog/1/obj/007c2b2500000006
+/tmp/sheepdog/1/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000001
+/tmp/sheepdog/2/obj/007c2b2500000002
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000004
+/tmp/sheepdog/2/obj/007c2b2500000005
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+e0b27e7466a3c21d0a4dedfed8bb9184 -
+f35835c0a25be5ee75a536d1816c1db4 -
+0faf5f38c28a38a6db1e6dfcdf259141 -
+83bffbfb00dbcb7d6b4a2fa9274175b9 -
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 8 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003, 127.0.0.1:7004, 127.0.0.1:7005, 127.0.0.1:7006, 127.0.0.1:7007]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000003
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/007c2b2500000006
+/tmp/sheepdog/0/obj/007c2b2500000007
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/007c2b2500000003
+/tmp/sheepdog/1/obj/007c2b2500000004
+/tmp/sheepdog/1/obj/007c2b2500000005
+/tmp/sheepdog/1/obj/007c2b2500000006
+/tmp/sheepdog/1/obj/007c2b2500000007
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000001
+/tmp/sheepdog/2/obj/007c2b2500000002
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/007c2b2500000004
+/tmp/sheepdog/2/obj/007c2b2500000005
+/tmp/sheepdog/2/obj/007c2b2500000006
+/tmp/sheepdog/2/obj/007c2b2500000007
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/6/obj/007c2b2500000003
+/tmp/sheepdog/7/obj/007c2b2500000003
Cluster recovery: enable
Cluster status: running
Cluster created at DATE
Epoch Time Version
-DATE 2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
-DATE 1 [127.0.0.1:7000, 127.0.0.1:7001]
+DATE 8 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003, 127.0.0.1:7004, 127.0.0.1:7005, 127.0.0.1:7006, 127.0.0.1:7007]
+/tmp/sheepdog/0/obj/007c2b2500000000
+/tmp/sheepdog/0/obj/007c2b2500000001
+/tmp/sheepdog/0/obj/007c2b2500000002
+/tmp/sheepdog/0/obj/007c2b2500000004
+/tmp/sheepdog/0/obj/007c2b2500000005
+/tmp/sheepdog/0/obj/807c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000000
+/tmp/sheepdog/1/obj/007c2b2500000001
+/tmp/sheepdog/1/obj/007c2b2500000002
+/tmp/sheepdog/1/obj/807c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000000
+/tmp/sheepdog/2/obj/007c2b2500000003
+/tmp/sheepdog/2/obj/807c2b2500000000
+/tmp/sheepdog/3/obj/007c2b2500000004
+/tmp/sheepdog/3/obj/007c2b2500000005
+/tmp/sheepdog/3/obj/007c2b2500000007
+/tmp/sheepdog/4/obj/007c2b2500000001
+/tmp/sheepdog/4/obj/007c2b2500000002
+/tmp/sheepdog/4/obj/007c2b2500000004
+/tmp/sheepdog/4/obj/007c2b2500000006
+/tmp/sheepdog/5/obj/007c2b2500000005
+/tmp/sheepdog/5/obj/007c2b2500000006
+/tmp/sheepdog/5/obj/007c2b2500000007
+/tmp/sheepdog/6/obj/007c2b2500000003
+/tmp/sheepdog/7/obj/007c2b2500000003
+/tmp/sheepdog/7/obj/007c2b2500000006
+/tmp/sheepdog/7/obj/007c2b2500000007
--
1.7.2.5
More information about the sheepdog
mailing list