Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 47 lines (33 sloc) 0.983 kb
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
#!/bin/bash

# Make sure data written to the cluster can be read from a newly joined node

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

_cleanup

VDI_NAME="test"
VDI_SIZE="300M"

echo "starting first sheep"
for i in `seq 0 0`; do
_start_sheep $i
done
_wait_for_sheep "1"

echo "formatting cluster"
$COLLIE cluster format -c 1

echo "creating vdi ${NAME}"
$COLLIE vdi create ${VDI_NAME} ${VDI_SIZE}

echo "filling ${VDI_NAME} with data"
qemu-io -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io

echo "reading back ${VDI_NAME}"
qemu-io -c "read 0 1m" sheepdog:${VDI_NAME} | _filter_qemu_io

echo "starting second sheep"
for i in `seq 1 1`; do
_start_sheep $i
done
_wait_for_sheep "2"

echo "reading data from second sheep"
qemu-io -c "read 0 ${VDI_SIZE}" sheepdog:localhost:7001:${VDI_NAME} | _filter_qemu_io
Something went wrong with that request. Please try again.