diff --git a/tests/run_3osds.sh b/tests/run_3osds.sh index ba37e0aa..28f5ef67 100644 --- a/tests/run_3osds.sh +++ b/tests/run_3osds.sh @@ -39,19 +39,19 @@ done cd mon npm install cd .. -node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 &>./testdata/mon.log & +(while true; do node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 || true; done) &>./testdata/mon.log & MON_PID=$! if [ "$SCHEME" = "ec" ]; then PG_SIZE=${PG_SIZE:-5} - PG_MINSIZE=${PG_MINSIZE:-3} - PG_DATA_SIZE=$PG_MINSIZE - POOLCFG='"scheme":"ec","parity_chunks":'$((PG_SIZE-PG_MINSIZE)) + PG_MINSIZE=${PG_MINSIZE:-4} + PG_DATA_SIZE=${PG_DATA_SIZE:-3} + POOLCFG='"scheme":"ec","parity_chunks":'$((PG_SIZE-PG_DATA_SIZE)) elif [ "$SCHEME" = "xor" ]; then PG_SIZE=${PG_SIZE:-3} - PG_MINSIZE=${PG_MINSIZE:-2} - PG_DATA_SIZE=$PG_MINSIZE - POOLCFG='"scheme":"xor","parity_chunks":'$((PG_SIZE-PG_MINSIZE)) + PG_MINSIZE=${PG_MINSIZE:-3} + PG_DATA_SIZE=$((PG_SIZE-1)) + POOLCFG='"scheme":"xor","parity_chunks":1' else PG_SIZE=${PG_SIZE:-2} PG_MINSIZE=${PG_MINSIZE:-2} diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 82fb5d98..1c0e7c56 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -44,5 +44,5 @@ SCHEME=xor ./test_write.sh ./test_write_no_same.sh -./test_heal.sh -SCHEME=ec PG_MINSIZE=2 ./test_heal.sh +PG_SIZE=2 ./test_heal.sh +SCHEME=ec ./test_heal.sh diff --git a/tests/test_add_osd.sh b/tests/test_add_osd.sh index 658d69c3..e685c9ad 100755 --- a/tests/test_add_osd.sh +++ b/tests/test_add_osd.sh @@ -28,7 +28,7 @@ if ! ($ETCDCTL get /vitastor/config/pgs --print-value-only |\ format_error "FAILED: OSD NOT ADDED INTO DISTRIBUTION" fi -wait_finish_rebalance 20 +wait_finish_rebalance 60 sleep 1 kill -9 $OSD4_PID @@ -50,6 +50,6 @@ if ! ($ETCDCTL get /vitastor/config/pgs --print-value-only |\ format_error "FAILED: OSD NOT REMOVED FROM DISTRIBUTION" fi -wait_finish_rebalance 20 +wait_finish_rebalance 60 format_green OK diff --git a/tests/test_heal.sh b/tests/test_heal.sh index 09428139..459aae1d 100755 --- a/tests/test_heal.sh +++ b/tests/test_heal.sh @@ -2,7 +2,11 @@ # Kill OSDs while writing -PG_SIZE=3 +PG_SIZE=${PG_SIZE:-3} +if [[ "$SCHEME" = "ec" ]]; then + PG_DATA_SIZE=${PG_DATA_SIZE:-2} + PG_MINSIZE=${PG_MINSIZE:-3} +fi OSD_COUNT=7 PG_COUNT=32 . `dirname $0`/run_3osds.sh diff --git a/tests/test_interrupted_rebalance.sh b/tests/test_interrupted_rebalance.sh index e78e8d57..8319266b 100755 --- a/tests/test_interrupted_rebalance.sh +++ b/tests/test_interrupted_rebalance.sh @@ -31,7 +31,7 @@ try_reweight 4 1 try_reweight 5 1 # Wait for the rebalance to finish -wait_finish_rebalance 60 +wait_finish_rebalance 300 # Check that PGs never had degraded objects ! # FIXME: In fact, the test doesn't guarantee it because PGs aren't always peered only with full prior OSD sets :-( diff --git a/tests/test_vm_cont.sh b/tests/test_vm_cont.sh index fdded344..e51e6e1e 100755 --- a/tests/test_vm_cont.sh +++ b/tests/test_vm_cont.sh @@ -14,7 +14,7 @@ for i in $(seq 1 $OSD_COUNT); do eval OSD${i}_PID=$! done -node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" &>./testdata/mon.log & +(while true; do node mon/mon-main.js --etcd_url $ETCD_URL --etcd_prefix "/vitastor" --verbose 1 || true; done) &>./testdata/mon.log & MON_PID=$! sleep 3