Skip to content

Fix DNS lookup failure caused by too-short dial timeout#1517

Closed
brandond wants to merge 1 commit intogoogle:mainfrom
brandond:fix_dns_timeout
Closed

Fix DNS lookup failure caused by too-short dial timeout#1517
brandond wants to merge 1 commit intogoogle:mainfrom
brandond:fix_dns_timeout

Conversation

@brandond
Copy link
Copy Markdown

If the user's primary nameserver is unavailable, and they are using the default resolver timeout of 5 seconds, the dial will fail before it can attempt to use any backup nameservers.

This change raises the dial timeout to a value that should allow failover through multiple nameservers. With a value of 16 seconds, the 4th nameserver has 1 second to respond before the dial times out.

Signed-off-by: Brad Davidson [email protected]

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Dec 23, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@brandond
Copy link
Copy Markdown
Author

x-ref: rancher/wharfie#11

If the user's primary nameserver is unavailable, and they are using the default
resolver timeout of 5 seconds, the dial will fail before it can attempt
to use any backup nameservers.

This change raises the dial timeout to a value that should allow
failover through multiple nameservers. With a value of 16 seconds, the
4th nameserver has 1 second to respond before the dial times out.

Signed-off-by: Brad Davidson <[email protected]>
Copy link
Copy Markdown
Contributor

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonjohnsonjr
Copy link
Copy Markdown
Collaborator

Attempted to put together an ~alternative to this: #1521

Reverts this back to the default dialer timeout and fixes the issue with #1165 in a different manner.

@brandond
Copy link
Copy Markdown
Author

That's great; a parallel ping would be preferred to just increasing the timeout again.

@jonjohnsonjr
Copy link
Copy Markdown
Collaborator

Closing in favor of #1521, let me know if you still see issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants