[sheepdog] [PATCH 3/6] sheep: wait for vdi copies to be updated in recovery process

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Sep 4 07:50:28 CEST 2012


At Tue, 04 Sep 2012 13:16:52 +0800,
Liu Yuan wrote:
> 
> On 09/04/2012 01:03 PM, MORITA Kazutaka wrote:
> > If node membership changes between process_work and process_main of
> > SD_OP_NEW_VDI, we cannot get the vdi copies in recovery process.  In
> > that case, we need to wait for post_cluster_new_vdi to finish.
> 
> Do we really need it? cluster_new_vdi() will take care of writing all
> copies in the right place while node change because of retry mechanism,
> I don't think we need to recover those objects. no?

Sorry, I think my description was not enough to explain what is a
problem.

Here is an example scenario:

 1. There is three node A, B and C. (redundancy level is 2)
 2. Run "collie vdi create", and vdi objects are created on node A
    and B.
 3. Node B leaves from Sheepdog before the unblock message of
    SD_OP_NEW_VDI is multicasted.  The new locations of the vdi object
    are node A and C.
 4. Node C tries to get the number of copies of the vdi object in
    screen_object_list(), but it fails because cluster_post_new_vdi(),
    which will set vdi copies, is not called yet.

Actually, test 040 hits this problem occasionally.

Thanks,

Kazutaka



More information about the sheepdog mailing list