[sheepdog] [PATCH v3 12/13] tests: test node failure while reweighting
Liu Yuan
namei.unix at gmail.com
Mon May 27 13:36:15 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
tests/064 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/064.out | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/group | 1 +
3 files changed, 107 insertions(+)
create mode 100755 tests/064
create mode 100644 tests/064.out
diff --git a/tests/064 b/tests/064
new file mode 100755
index 0000000..68f5c6b
--- /dev/null
+++ b/tests/064
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Test node failure while reweighting
+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
+
+_need_to_be_root
+
+_cleanup
+
+_make_device 0 $((200 * 1024 ** 2)) # 200 MB
+_make_device 1 $((200 * 1024 ** 2)) # 200 MB
+_make_device 2 $((400 * 1024 ** 2)) # 400 MB
+_make_device 3 $((200 * 1024 ** 2)) # 200 MB
+
+#start three in different size
+for i in 0 1 2; do
+ _start_sheep $i
+done
+_wait_for_sheep 3
+$COLLIE cluster format -c 2
+sleep 1
+
+$COLLIE vdi create test 100M -P
+$COLLIE node info
+$COLLIE node list
+
+$COLLIE node md plug $STORE/3
+_wait_for_sheep_recovery 0
+$COLLIE node info
+$COLLIE node list
+
+$COLLIE cluster reweight
+
+# restart sheep1 while reweighting
+_kill_sheep 2
+_wait_for_sheep_recovery 0
+$COLLIE node info
+$COLLIE node list
+_start_sheep 2
+
+_wait_for_sheep_recovery 0
+$COLLIE node info
+$COLLIE node list
+$COLLIE cluster info | _filter_cluster_info
diff --git a/tests/064.out b/tests/064.out
new file mode 100644
index 0000000..9ec0a3d
--- /dev/null
+++ b/tests/064.out
@@ -0,0 +1,53 @@
+QA output created by 064
+using backend plain store
+Id Size Used Avail Use%
+ 0 192 MB 72 MB 120 MB 37%
+ 1 192 MB 52 MB 140 MB 27%
+ 2 385 MB 84 MB 301 MB 21%
+Total 769 MB 208 MB 561 MB 27%
+
+Total virtual image size 100 MB
+M Id Host:Port V-Nodes Zone
+- 0 127.0.0.1:7000 48 0
+- 1 127.0.0.1:7001 48 1
+- 2 127.0.0.1:7002 96 2
+Id Size Used Avail Use%
+ 0 384 MB 72 MB 312 MB 18%
+ 1 192 MB 52 MB 140 MB 27%
+ 2 385 MB 84 MB 301 MB 21%
+Total 961 MB 208 MB 753 MB 21%
+
+Total virtual image size 100 MB
+M Id Host:Port V-Nodes Zone
+- 0 127.0.0.1:7000 48 0
+- 1 127.0.0.1:7001 48 1
+- 2 127.0.0.1:7002 96 2
+Id Size Used Avail Use%
+ 0 384 MB 104 MB 280 MB 27%
+ 1 192 MB 104 MB 88 MB 54%
+Total 576 MB 208 MB 368 MB 36%
+
+Total virtual image size 100 MB
+M Id Host:Port V-Nodes Zone
+- 0 127.0.0.1:7000 64 0
+- 1 127.0.0.1:7001 64 1
+Id Size Used Avail Use%
+ 0 384 MB 72 MB 312 MB 18%
+ 1 192 MB 52 MB 140 MB 27%
+ 2 385 MB 84 MB 301 MB 21%
+Total 961 MB 208 MB 753 MB 21%
+
+Total virtual image size 100 MB
+M Id Host:Port V-Nodes Zone
+- 0 127.0.0.1:7000 48 0
+- 1 127.0.0.1:7001 48 1
+- 2 127.0.0.1:7002 96 2
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time Version
+DATE 4 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+DATE 3 [127.0.0.1:7000, 127.0.0.1:7001]
+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, 127.0.0.1:7002]
diff --git a/tests/group b/tests/group
index 40a24b0..d8824e3 100644
--- a/tests/group
+++ b/tests/group
@@ -77,3 +77,4 @@
061 auto quick cluster md
062 auto quick cluster md
063 auto quick cluster md
+064 auto quick cluster md
--
1.7.9.5
More information about the sheepdog
mailing list