>> I was wondering if there was an easy way to check if a given zookeeper
server has joined an ensemble successfully and how many nodes of the
ensemble are alive.
Today, we do this by relying on the Mode reported by the srvr command. If
the value is anything other than leader/follower, it is not participating
in the quorum.
We simply count the total of leader/follower nodes and ensure that they are
higher than a threshold.
The downside of this approach is having to run srvr periodically.
On Tue, Dec 6, 2011 at 11:44 AM, Florian Leibert <[EMAIL PROTECTED]> wrote:
> Thanks - though I'll have to have knowledge of the other servers and have
> to maintain yet another copy of the server-addresses - I wanted to use it
> within monit to determine if the server is functioning correctly - while I
> of course have to always change the zoo.cnf in case of topology changes, I
> now also have to update my monit scripts to add/remove any servers to use
> with the smoketest.
> Too bad ZK doesn't expose via the API a get_ensemble_size ~ that would
> allow me to alert in case the ensemble is less than X...
> But this helps!
> On Tue, Dec 6, 2011 at 11:39 AM, Patrick Hunt <[EMAIL PROTECTED]> wrote:
> > I created the zk-smoketest project explicitly to help ops with this
> > problem:
> > https://github.com/phunt/zk-smoketest
> > Patrick
> > On Tue, Dec 6, 2011 at 9:39 AM, Florian Leibert <[EMAIL PROTECTED]> wrote:
> > > Hi -
> > > I was wondering if there was an easy way to check if a given zookeeper
> > > server has joined an ensemble successfully and how many nodes of the
> > > ensemble are alive. Of course I could create a test-node on one of the
> > > servers and check the existence on the other ones but wanted to check
> > first
> > > if there was another way.
> > >
> > > I looked at the client bindings in the python project as well as the
> > > in the ruby project but didn't see that there really was one. I
> > > specifically want to ensure that the servers are communicating with
> > > other and not form "separate" ensembles.
> > >
> > > Thanks,
> > > Florian
> Best regards,
> http://twitter.com/flo <http://twitter.com/floleibert>