[ https://issues.apache.org/jira/browse/ZOOKEEPER-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742079#comment-14742079 ]
Flavio Junqueira edited comment on ZOOKEEPER-1506 at 9/21/15 4:06 PM: ---------------------------------------------------------------------- The patch still doesn't apply cleanly for me, here is the output of patch: {noformat} patching file .gitignore patching file CHANGES.txt patching file src/java/main/org/apache/zookeeper/server/quorum/Learner.java patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java Hunk #2 FAILED at 95. Hunk #3 FAILED at 116. 2 out of 3 hunks FAILED -- saving rejects to file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java.rej patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java patching file src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java patching file src/java/systest/org/apache/zookeeper/test/system/QuorumPeerInstance.java patching file src/java/test/org/apache/zookeeper/server/quorum/CnxManagerTest.java Hunk #2 FAILED at 164. 1 out of 2 hunks FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/server/quorum/CnxManagerTest.java.rej patching file src/java/test/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLECompatibilityTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLEDontCareTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLELostMessageTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java patching file src/java/test/org/apache/zookeeper/test/FLENewEpochTest.java patching file src/java/test/org/apache/zookeeper/test/FLEPredicateTest.java patching file src/java/test/org/apache/zookeeper/test/FLERestartTest.java patching file src/java/test/org/apache/zookeeper/test/FLETest.java patching file src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java patching file src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java Hunk #1 FAILED at 128. 1 out of 1 hunk FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java.rej patching file src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java patching file src/java/test/org/apache/zookeeper/test/LETest.java patching file src/java/test/org/apache/zookeeper/test/QuorumBase.java Hunk #1 FAILED at 118. Hunk #2 FAILED at 227. 2 out of 2 hunks FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/test/QuorumBase.java.rej patching file src/java/test/org/apache/zookeeper/test/QuorumUtil.java patching file src/java/test/org/apache/zookeeper/test/TruncateTest.java Hunk #1 succeeded at 201 with fuzz 1. {noformat} btw, you don't have to change CHANGES.txt yourself, in fact, it is probably best that you don't. was (Author: fpj): The patch still doesn't apply cleanly to me, here is the output of patch: {noformat} patching file .gitignore patching file CHANGES.txt patching file src/java/main/org/apache/zookeeper/server/quorum/Learner.java patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java Hunk #2 FAILED at 95. Hunk #3 FAILED at 116. 2 out of 3 hunks FAILED -- saving rejects to file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java.rej patching file src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java patching file src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java patching file src/java/systest/org/apache/zookeeper/test/system/QuorumPeerInstance.java patching file src/java/test/org/apache/zookeeper/server/quorum/CnxManagerTest.java Hunk #2 FAILED at 164. 1 out of 2 hunks FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/server/quorum/CnxManagerTest.java.rej patching file src/java/test/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLECompatibilityTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLEDontCareTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/FLELostMessageTest.java patching file src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java patching file src/java/test/org/apache/zookeeper/test/FLENewEpochTest.java patching file src/java/test/org/apache/zookeeper/test/FLEPredicateTest.java patching file src/java/test/org/apache/zookeeper/test/FLERestartTest.java patching file src/java/test/org/apache/zookeeper/test/FLETest.java patching file src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java patching file src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java Hunk #1 FAILED at 128. 1 out of 1 hunk FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java.rej patching file src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java patching file src/java/test/org/apache/zookeeper/test/LETest.java patching file src/java/test/org/apache/zookeeper/test/QuorumBase.java Hunk #1 FAILED at 118. Hunk #2 FAILED at 227. 2 out of 2 hunks FAILED -- saving rejects to file src/java/test/org/apache/zookeeper/test/QuorumBase.java.rej patching file src/java/test/org/apache/zookeeper/test/QuorumUtil.java patching file src/java/test/org/apache/zookeeper/test/TruncateTest.java Hunk #1 succeeded at 201 with fuzz 1. {noformat} btw, you don't have to change CHANGES.txt yourself, in fact, it is probably best that you don't. > Re-try DNS hostname -> IP resolution if node connection fails > ------------------------------------------------------------- > > Key: ZOOKEEPER-1506 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1506 > Project: ZooKeeper > Issue Type: Improvement > Components: server > Affects Versions: 3.4.5, 3.4.6 > Environment: Ubuntu 11.04 64-bit > Reporter: Mike Heffner > Assignee: Robert P. Thille > Priority: Blocker > Labels: patch > Fix For: 3.4.7, 3.5.1, 3.6.0 > > Attachments: ZOOKEEPER-1506-fix.patch, ZOOKEEPER-1506.patch, > ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, > ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, > ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, ZOOKEEPER-1506.patch, > Zookeeper-1506.patch, zk-dns-caching-refresh.patch > > > In our zoo.cfg we use hostnames to identify the ZK servers that are part > of an ensemble. These hostnames are configured with a low (<= 60s) TTL and > the IP address they map to can and does change. Our procedure for > replacing/upgrading a ZK node is to boot an entirely new instance and remap > the hostname to the new instance's IP address. Our expectation is that when > the original ZK node is terminated/shutdown, the remaining nodes in the > ensemble would reconnect to the new instance. > However, what we are noticing is that the remaining ZK nodes do not attempt > to re-resolve the hostname->IP mapping for the new server. Once the original > ZK node is terminated, the existing servers continue to attempt contacting it > at the old IP address. It would be great if the ZK servers could try to > re-resolve the hostname when attempting to connect to a lost ZK server, > instead of caching the lookup indefinitely. Currently we must do a rolling > restart of the ZK ensemble after swapping a node -- which at three nodes > means we periodically lose quorum. > The exact method we are following is to boot new instances in EC2 and attach > one, of a set of three, Elastic IP address. External to EC2 this IP address > remains the same and maps to whatever instance it is attached to. Internal to > EC2, the elastic IP hostname has a TTL of about 45-60 seconds and is remapped > to the internal (10.x.y.z) address of the instance it is attached to. > Therefore, in our case we would like ZK to pickup the new 10.x.y.z address > that the elastic IP hostname gets mapped to and reconnect appropriately. -- This message was sent by Atlassian JIRA (v6.3.4#6332)