-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZOOKEEPER-4728: force to re-resolve hostname into IP when binding. #2040
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
@symat @eolivelli , call for review. Thanks. |
Nice catch @showuon . Would you please try adding a unit test to cover the issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Tests added. Thanks. |
@@ -318,7 +322,7 @@ Optional<ServerSocket> createServerSocket(InetSocketAddress address, boolean por | |||
serverSocket = new ServerSocket(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNENCRYPTED_SERVER_SOCKET: Unencrypted server socket (instead of SSLServerSocket)
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still great
+1
@anmolnar , please take a look when available. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@showuon I submitted this to the master branch which means it will be released in 3.10.0. If you would like to see this in earlier releases, please let me know and I can backport it for you. Also the Jira is not assigned to you, do you already have contributor rights for ZooKeeper jira project? |
Yes, I'd like to backport to 3.8 and 3.9 release. Thanks.
No, I don't have the contributor rights for ZooKeeper jira project. My JIRA ID: showuon. Thanks. |
…pache#2040) * ZOOKEEPER-4728: force to re-resolve hostname into IP when binding * ZOOKEEPER-4708: add test
@anmolnar , any update for the 3.8/3.9 version backport? |
…2040) * ZOOKEEPER-4728: force to re-resolve hostname into IP when binding * ZOOKEEPER-4708: add test (cherry picked from commit 40aed41) Signed-off-by: Andor Molnar <andor@apache.org>
…2040) * ZOOKEEPER-4728: force to re-resolve hostname into IP when binding * ZOOKEEPER-4708: add test (cherry picked from commit 40aed41) Signed-off-by: Andor Molnar <andor@apache.org>
@showuon Sorry. This is done now. |
…pache#2040) * ZOOKEEPER-4728: force to re-resolve hostname into IP when binding * ZOOKEEPER-4708: add test
When the leader tried to bind the host/IP to get connection from followers, if the DNS is not ready at first, it'll always stay in
<unresolved>
state forever. This PR tries to resolve hostname into IP each time we tried to bind.Note: The same solution we also applied in
QuorumCnxManager
(i.e. #1524)zookeeper/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
Line 1140 in 688c69c