Re: Uninvited ZK joins the cluster

2015-09-09 Thread Benjamin Jaton
OK maybe I'll dig into it.

Is there anything the user could do without changing the code?

On Wed, Sep 9, 2015 at 12:26 PM, Alexander Shraer  wrote:

> Hi,
>
> There were some thoughts to send and check the database id (if I'm not
> mistaken its called dbid) when servers connect to each other, which should
> be different for different zookeepers. It shouldn't be difficult to add, if
> you'd like to work on it.
>
> Alex
>
> On Wed, Sep 9, 2015 at 11:04 AM, Benjamin Jaton 
> wrote:
>
> > Hi,
> >
> > First I build a 3 nodes cluster (A,B,C) with zk.reconfig commands.
> >
> > Now we stop the all the ZK, and we make a new cluster (A,B,D) configured
> > with the same ports.
> >
> > In that scenario, if you start C, it will join the ensemble, becoming
> > (A,B,C,D).
> > The problem is that it's not the same ensemble, C shouldn't have been
> > allowed to join the new ensemble.
> >
> > Is there a way to prevent this from happening? (even if it's hacky)
> >
> > Thanks,
> > Ben
> >
>


Re: Uninvited ZK joins the cluster

2015-09-09 Thread Prabhjot Bharaj
Zoo.cfg on D is pointing to which myid?
Is that myid same for C as well?
How does zoo.cfg look like on all nodes?

Regards,
Prabhjot
On Sep 10, 2015 3:43 AM, "Benjamin Jaton"  wrote:

> OK maybe I'll dig into it.
>
> Is there anything the user could do without changing the code?
>
> On Wed, Sep 9, 2015 at 12:26 PM, Alexander Shraer 
> wrote:
>
> > Hi,
> >
> > There were some thoughts to send and check the database id (if I'm not
> > mistaken its called dbid) when servers connect to each other, which
> should
> > be different for different zookeepers. It shouldn't be difficult to add,
> if
> > you'd like to work on it.
> >
> > Alex
> >
> > On Wed, Sep 9, 2015 at 11:04 AM, Benjamin Jaton <
> benjamin.ja...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > First I build a 3 nodes cluster (A,B,C) with zk.reconfig commands.
> > >
> > > Now we stop the all the ZK, and we make a new cluster (A,B,D)
> configured
> > > with the same ports.
> > >
> > > In that scenario, if you start C, it will join the ensemble, becoming
> > > (A,B,C,D).
> > > The problem is that it's not the same ensemble, C shouldn't have been
> > > allowed to join the new ensemble.
> > >
> > > Is there a way to prevent this from happening? (even if it's hacky)
> > >
> > > Thanks,
> > > Ben
> > >
> >
>


Re: Uninvited ZK joins the cluster

2015-09-09 Thread Alexander Shraer
Hi,

There were some thoughts to send and check the database id (if I'm not
mistaken its called dbid) when servers connect to each other, which should
be different for different zookeepers. It shouldn't be difficult to add, if
you'd like to work on it.

Alex

On Wed, Sep 9, 2015 at 11:04 AM, Benjamin Jaton 
wrote:

> Hi,
>
> First I build a 3 nodes cluster (A,B,C) with zk.reconfig commands.
>
> Now we stop the all the ZK, and we make a new cluster (A,B,D) configured
> with the same ports.
>
> In that scenario, if you start C, it will join the ensemble, becoming
> (A,B,C,D).
> The problem is that it's not the same ensemble, C shouldn't have been
> allowed to join the new ensemble.
>
> Is there a way to prevent this from happening? (even if it's hacky)
>
> Thanks,
> Ben
>