1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/bin/bash
# Test sheep joining with older objects
. ./common
if [[ "$DRIVER" == zoo* ]];then
DRIVER=${DRIVER/1000/5000}
fi
# start 8 nodes
for i in `seq 0 15`; do
_start_sheep $i
done
_wait_for_sheep 16
_cluster_format -c 6
_vdi_create test 100M
# create 25 objects
for i in `seq 0 24`; do
echo $i | $DOG vdi write test $((i * 4 * 1024 * 1024)) 512
done
# kill 5 nodes
nr=16
for i in `seq 3 7`; do
_wait_for_sheep $nr
_wait_for_sheep_recovery 0
_kill_sheep $i
nr=$(($nr - 1))
done
_wait_for_sheep 11
# update vdi
for i in `seq 0 24`; do
echo $(($i + 100)) | $DOG vdi write test $((i * 4 * 1024 * 1024)) 512
done
$DOG vdi read test | md5sum
# start 5 nodes who have old objects
for i in `seq 3 7`; do
_start_sheep $i
done
_wait_for_sheep 16
for i in `seq 0 15`; do
$DOG vdi read test -p $((7000+$i)) | md5sum
done
|