suhasdantkale opened a new pull request #1256: ZOOKEEPER-2164: Quorum members can not rejoin after restart URL: https://github.com/apache/zookeeper/pull/1256 (Ported from Mate Szalay-Beko's work in master branch. Refer to https://github.com/apache/zookeeper/pull/1254) Ever since ZOOKEEPER-107 (released in 3.5.0) the servers are sending their addresses during initial connection requests. The receiving server can potentially use these addresses to send back a new connection request if the challenge is won by the receiver. If the server config contains wildcard address (e.g. 0.0.0.0 in case of IPv4) then the first connection request sent by A to B will contain this address. If the ID of A is smaller than the ID of B, then A will lose the challenge and the second connection request sent back by B will never reach A, as B will send the initial message to 0.0.0.0. So in any 3.5+ ZooKeeper, if wildcard addresses are used in the configs, then there might be some servers never able to rejoin to the quorum after they got restarted. In 3.5+ for backward compatibility reasons (needed during rolling upgrade) there is a version of the QuorumCnxManager.connectOne() method that needs no election address but use the last known address to initiate the connection. In this commit, we simply call this method if the address is a wildcard address. I also added a few restart realted tests, to make sure that restart still works when we don't use no wildcard addresses. We can not test the original error with unit tests, as it would require to start the quorum on multiple hosts. I also tested manually the rolling restart both with and without wildcard addresses in the config. Reviewer: Mate Szalay-Beko <[email protected]>
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
