[sheepdog] [PATCH 2/2] tests: avoid false detection of network partion

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sun Sep 9 19:06:28 CEST 2012


If more than half nodes go down at the same time, sheep wrongly
detects a network partition failure.  This add one second sleep to
avoid the problem.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/033 |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tests/033 b/tests/033
index 93d8314..40b9734 100755
--- a/tests/033
+++ b/tests/033
@@ -32,9 +32,14 @@ done
 $COLLIE vdi read test | md5sum
 
 # kill 7 nodes without waiting to finish recovery
-for i in `seq 7 -1 1`; do
+for i in 7 6 5; do
     _kill_sheep $i
 done
+sleep 1 # this is necessary to avoid network partition detection
+for i in 4 3 2 1; do
+    _kill_sheep $i
+    sleep 1
+done
 
 # make sheep 0 master to avoid master transfer
 sleep 1
-- 
1.7.2.5




More information about the sheepdog mailing list