[sheepdog] [PATCH v4 8/8] sheep: make gateway requests only retry in io_op_done()
MORITA Kazutaka
morita.kazutaka at gmail.com
Sun May 27 20:29:41 CEST 2012
At Sat, 26 May 2012 13:33:11 +0800,
Liu Yuan wrote:
>
> On 05/26/2012 11:28 AM, levin li wrote:
>
> > On 05/25/2012 10:22 PM, Christoph Hellwig wrote:
> >> On Fri, May 25, 2012 at 10:31:00AM +0800, levin li wrote:
> >>> From: levin li <xingke.lwp at taobao.com>
> >>>
> >>> We should not make gateway retry in check_request when the
> >>> requested object is in recovery, we should make it retry in
> >>> io_op_done(), gateway request does not access local objects,
> >>> so we should not make it retry when the local objects are in
> >>> recovery.
> >>
> >> This patch seems to break the following simple test case that reads
> >> from a newly started sheep because it can't find the object yet:
> >>
> >> sheep -p 7000 /tmp/sheep/0
> >> collie cluster format --copies=1
> >> collie vdi create test-vdi 300M
> >> dd if=/dev/zero count=100M | collie vdi write tet-vdi
> >>
> >> sheep -p 7001 /tmp/sheep/1
> >> collie vdi read -p 7001
> >>
> >
> > I tested with your script, and make it run on my computer like this:
> >
> > sheep -d -p 7000 /tmp/sheep/0 -z 0
> > collie cluster format -c 1
> > collie vdi create test-vdi 300M
> > dd if=/dev/zero count=100M | collie vdi write test-vdi
> > sheep -d -p 7001 /tmp/sheep/1 -z 1
> > collie vdi read -p 7001 test-vdi 0 100M
> >
> > I got a error message:
> > Cannot get VDI info for test-vdi 0 : Waiting for cluster to be formatted
> > Failed to open VDI test-vdi
> >
> > But, even though I popup all the patches in the patch set, it still give
> > that error message, I think it's another problem, or maybe it's not a bug
> > at all, because later I try to run 'collie vdi read -p 7001 test-vdi 0 100M'
> > again, it works well.
> >
>
>
> I test the script, and I think this problem has nothing to do with the
> this patch set.
>
> It is because SD_OP_LOCK_VDI executes in a worker before sd_join_done().
> SD_OP_LOCK_VDI/SD_OP_RELEASE_VDI seems not to be implemented at all,
> Kazum ,what is it used for?
Sheepdog had a lock feature before to ensure that two VMs doesn't open
the same image at the same time. The feature was removed since users
should have their own system to manage VMs and it would be much easier
for the system to lock VMs. Currently, SD_OP_LOCK_VDI is same as
SD_OP_GET_VDI_INFO and SD_OP_RELEASE_VDI does nothing.
Thanks,
Kazutaka
More information about the sheepdog
mailing list