[sheepdog] [PATCH 0/7] refactor sdnet.c

Liu Yuan namei.unix at gmail.com
Fri Jun 1 07:51:44 CEST 2012


On 06/01/2012 12:46 AM, Christoph Hellwig wrote:

> On Thu, May 31, 2012 at 11:40:02PM +0800, Liu Yuan wrote:
>> On 05/31/2012 05:48 PM, Christoph Hellwig wrote:
>>
>>> This series rearranges the code in sdnet.c to:
>>>
>>>  - always go through the same code path to submit and resubmit requests
>>>  - completely separate the code path for gateway vs peer requests
>>>  - fix a bug in node version mismatch handling
>>
>>
>> Current devel branch will fail for following script:
> 
> It does for me too, but only because of the bug fixed by
> 
> 	sheep: do not use strbuf for screen_obj_list
> 
> if I cherry pick that patch to devel things work fine for me.
> 


Current devel branch still fails for following script (master can pass it):
#!/bin/bash

set -e

pkill -9 sheep
rm store/* -rf

# start three 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

# create a pre-allocated vdi
./collie/collie vdi create test0 80M
./collie/collie vdi create test1 80M
./collie/collie vdi create test2 80M

echo stop the 4th sheep
pkill -f "sheep -d /home/tailai.ly/sheepdog/store/3"
sleep 1
echo write data to the vdis
dd if=/dev/urandom | collie/collie vdi write test0 -p 7000
dd if=/dev/urandom | collie/collie vdi write test1 -p 7001 &
dd if=/dev/urandom | collie/collie vdi write test2 -p 7002 &

echo restart the 4rd sheep
./sheep/sheep -d /home/tailai.ly/sheepdog/store/3 -z 3 -p 7003 -W

echo join a new sheep
sleep 5
./sheep/sheep -d /home/tailai.ly/sheepdog/store/4 -z 4 -p 7004 -W
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 1 2 3 4; do
    ./collie/collie vdi read test0 -p 700$i | md5sum
    ./collie/collie vdi read test1 -p 700$i | md5sum
    ./collie/collie vdi read test2 -p 700$i | md5sum
done




More information about the sheepdog mailing list