[sheepdog] [PATCH] sheep: handle recovery request in check_request_in_recovery()

Liu Yuan namei.unix at gmail.com
Sat Jun 2 17:22:09 CEST 2012


On 06/02/2012 10:46 PM, Christoph Hellwig wrote:

> This one causes a regression for me in a test case that first kills one
> zone and then a littler later a second one and then checks that all
> blocks have the expected replication level.


I tried the following script to simulate your scenario, but it passes.
Any comment on this script?

=====================================================
#!/bin/bash

set -e

pkill -9 sheep
rm store/* -rf
# start four sheep daemons
for i in 0 1 2 3; do
    ./sheep/sheep -d /home/tailai.ly/sheepdog/store/$i -z $i -p 700$i -W
done

sleep 1
./collie/collie cluster format -c 2

./collie/collie vdi create test0 200M
dd if=/dev/urandom | collie/collie vdi write test0 -p 7000 &
sleep 3

echo stop one sheep
pkill -f "sheep -d /home/tailai.ly/sheepdog/store/1"
sleep 3
echo stop another one sheep
pkill -f "sheep -d /home/tailai.ly/sheepdog/store/2"
echo write data to the vdis

echo wait for object recovery to finish
for ((;;)); do
	if [ "$(pgrep collie)" ]; then
		sleep 1
	else
		break
	fi
done
# show md5sum of the vdi on each node
for i in 0 3; do
    ./collie/collie vdi read test0 -p 700$i | md5sum
done
=================

Thanks,
Yuan



More information about the sheepdog mailing list