[sheepdog] [PATCH] zk: delete zk node before join cluster

Kai Zhang kyle at zelin.io
Fri May 31 04:03:32 CEST 2013


On May 31, 2013, at 9:48 AM, MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> wrote:

> At Fri, 31 May 2013 09:44:10 +0800,
> Kai Zhang wrote:
>> 
>> 
>> On May 30, 2013, at 11:09 PM, Liu Yuan <namei.unix at gmail.com> wrote:
>> 
>>> On 05/30/2013 03:20 PM, Liu Yuan wrote:
>>>> On 05/30/2013 02:37 PM, Kai Zhang wrote:
>>>>> Delete zk node before join cluster and return -1 when fail.
>>>> 
>>>> Applied, thanks.
>>>> 
>>> 
>>> Oops, this patch breaks
>>> 
>>>       /* For concurrent nodes setup, we allow only one to continue */
>>>       while (zk_member_empty() && zk_master_create() != ZOK)
>>>               ;/* wait */
>>> 
>>> I guess this was why in the old code I chose to panic(). Now when I
>>> start 3 node concurrently, I'll end up with 3 nodes are all master.
>>> Unless we find a solution, this patch will be reverted.
>> 
>> However, current implementation of master election also has problem.
>> 
>> I will rewrite this by using sequential node which is a standard way of implementing master election.
> 
> Can you wait with the patch?  I have a patch set which will completely
> remove a master from the cluster drivers.  I think of sending them
> after I release the 0.6.0 release.



When will the 0.6.0 be released?

And would you like to share some details of removing master?
As I discussed with Yuan, we both believe that current zookeeper driver is not quite stable in a bad network environment.
Maybe corosync also has this problem, Wenhao has tested this.

If group.c has the ability of rejoin cluster or removing master logic totally, that would be awesome.

However, both of them need carefully design and lots of work and test.
So if you plan to release 0.6.0 in this days. I would be ok that we do this job in next version.

Thanks,
Kyle






More information about the sheepdog mailing list