Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFD7B9A95 for ; Sat, 28 Jul 2012 00:56:11 +0000 (UTC) Received: (qmail 63693 invoked by uid 500); 28 Jul 2012 00:56:10 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 63660 invoked by uid 500); 28 Jul 2012 00:56:10 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 63651 invoked by uid 99); 28 Jul 2012 00:56:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 00:56:10 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,FSL_RCVD_USER,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shralex@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 00:56:02 +0000 Received: by obfk16 with SMTP id k16so4513346obf.15 for ; Fri, 27 Jul 2012 17:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=SsxgOiuRp971d3f/Q9xrjXPr5dNaL9AIOu9fhFmnB3E=; b=JykL4suU3sDUEQOd5eCqXiJAy+qpP9teJklEwcXI/kahsZmKsonwjxPylgpjx+imnf yxHNIa0hcrLdSvrMy+kE2qr+KyyHg5theVdr4KuIt9OCUNGBQXKc77HL4jzAvVvC9HBw GZg5iPUg13ib9I5kyya2MwFUoyTrqJvUpXqVrqTClIKZLqQeqtP4j+Hdb+YEN/CHxpJz idbeF3RMGS2DK4Xe+3hnrdWHgHntcgMiSvRSSG+4J2nvZQDH8nYOfNsOzgETanzfd+dN NmLk/snxUdwe/ueCA49SvMOQUR9XBmO+WSiYzSgQPTCYcLWxytYoiQmKr5US8oiTiZsQ 2VEw== Received: by 10.60.29.228 with SMTP id n4mr6018983oeh.27.1343436941678; Fri, 27 Jul 2012 17:55:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.22.161 with HTTP; Fri, 27 Jul 2012 17:55:21 -0700 (PDT) In-Reply-To: References: From: Alexander Shraer Date: Fri, 27 Jul 2012 17:55:21 -0700 Message-ID: Subject: Re: Dynamic reconfiguration To: Jared Cantwell Cc: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=e89a8ff250eeafd8d304c5d94959 --e89a8ff250eeafd8d304c5d94959 Content-Type: text/plain; charset=ISO-8859-1 Yes, any number of followers which are not in the configuration can just connect and listen in. This has always been the case, also in 3.4, I just made use of this for the purpose of adding members during reconfiguration. Moreover, in 3.4 there this bug ZOOKEEPER-1113 where the leader actually counts the votes of anyone connected, regardless of config membership :) This is fixed in ZK-107, so they are really non-voting followers. > I am assuming that's the case, and that it is a follower (and not > participant) by virtue of not being in the official configuration stored in > zookeeper itself. Follower and participant types of servers is not something that was defined in ZK-107. In ZooKeeper every follower/leader is a "participant". Its just that the votes of participants that are not in the configuration are not counted that's why we call them non-voting followers. BTW, obviously a non-voting follower can not become leader (like ZK-1113 this was also not enforced before ZK-107). > And a followup... does zookeeper only overwrite the dynamic > configuration file for nodes that are voting participants? Such that if I > started a follower and then left it running through some > reconfigurations, its file would not get updated if it was never added as > part of those reconfigurations? No, as soon as it connects to the current leader, its dynamic config file is overwritten with the current configuration as part of the synchronization with the leader. Every time a new configuration is committed, all connected servers (voting, non-voting, observers) will update their dynamic config file, doesn't matter if they're in the config. Alex On Fri, Jul 27, 2012 at 5:35 PM, Jared Cantwell wrote: > So does just having the server started and pointing to the existing > ensemble automatically make it a "non participating follower"? In other > words, there is no need to inform the existing nodes that this new node is > joining as a follower? And to extend that, there could be any number of > followers that are simply listening in on the event stream? I am assuming > that's the case, and that it is a follower (and not participant) by virtue > of not being in the official configuration stored in zookeeper itself. > > On Fri, Jul 27, 2012 at 6:29 PM, Alexander Shraer wrote: > >> there are just two supported types - participant and observer. >> (participant can act as either follower or leader). >> >> So you can either write participant or leave it unspecified (which means >> participant by default). Also, since the ip is the same for all your ports >> you don't have to write it twice. All of these should work in the same way: >> >> server.5=10.10.5.17:2182:2183:participant;10.10.5.17:2181 >> server.5=10.10.5.17:2182:2183:participant;2181 >> server.5=10.10.5.17:2182:2183;10.10.5.17:2181 >> server.5=10.10.5.17:2182:2183;2181 >> >> >> >> On Fri, Jul 27, 2012 at 5:25 PM, Jared Cantwell > > wrote: >> >>> Thanks Alex for the response. Our current lines in the configuration >>> look like this: >>> >>> server.5=10.10.5.17:2182:2183:participant;10.10.5.17:2181 >>> >>> For the new servers is it ok for their entry to have "participant"? Or >>> should that be something different (e.g. "follower")? >>> >>> ~Jared >>> >>> On Fri, Jul 27, 2012 at 6:20 PM, Alexander Shraer wrote: >>> >>>> Hi Jared, >>>> >>>> Thanks for experimenting with this feature. >>>> >>>> The idea is that new servers join as "non voting followers". Which >>>> means that they act as normal followers but the leader ignores their votes >>>> since they are not part of the current configuration. The leader only >>>> counts their votes during the reconfiguration itself (to make sure a quorum >>>> of the new config is ready before the new config can be >>>> committed/activated). Defining them as observers is not a good idea, for >>>> example in your scenario if they were observers they wouldn't be able to >>>> participate in the reconfiguration protocol (which is similar to the >>>> protocol for committing any other operation in which observers don't >>>> participate) and since we don't have a quorum of followers in the new >>>> config that can ack, reconfiguration would throw an exception (of >>>> KeeperException.NEWCONFIGNOQUORUM type). >>>> Of course if you intend them to be observers in the new config you can >>>> define them as observers since their votes are not needed during reconfig >>>> anyway. >>>> >>>> You're right, the new servers must be able to connect to the old >>>> quorum. At minimum, their file should contain the current leader, but >>>> you can also copy the current configuration file to the new members if >>>> you wish. >>>> >>>> In addition, you should add a line for the member itself, so that >>>> server F appears in F's config file (Its not important that the other new >>>> servers appear in F's file, but it won't hurt either, so you can do a union >>>> of old and new if you wish). The constructor of QuorumPeer checks that the >>>> server itself is in the configuration its started with, otherwise its not >>>> going to run. This check has always been there, but I'm thinking of >>>> possibly changing it in the future. >>>> >>>> As soon as F connects to the leader, its config file will be >>>> overwritten with the current config file as part of the synchronization >>>> process. >>>> >>>> Alex >>>> >>>> >>>> On Fri, Jul 27, 2012 at 10:06 AM, Jared Cantwell < >>>> jared.cantwell@gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> We are testing integration with 3.5.0 and dynamic membership and I >>>>> have a >>>>> question. If I have a current set of servers in my ensemble >>>>> {A,B,C,D,E} >>>>> and I want to reconfigure the ensemble to {D,E,F,G,H}, how should the >>>>> dynamic config file on servers F,G,H be configured on startup? Should >>>>> they >>>>> have the old ensemble, the new ensemble, or the union of both >>>>> ensembles? >>>>> It seems like these new servers need to know about the old quorum, >>>>> but >>>>> since they aren't part of it yet its not clear to me how they should be >>>>> configured. Should there be an intermediate configuration with F,G, >>>>> and H >>>>> as simply Observers? >>>>> >>>>> I can't find much documentation on this so I want to make sure I >>>>> understand >>>>> things correctly. >>>>> >>>>> Thanks! >>>>> ~Jared >>>>> >>>> >>>> >>> >> > --e89a8ff250eeafd8d304c5d94959--