Skip to content
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

net: use DNS over TCP when use-vc is set in resolv.conf #29594

Closed
wants to merge 3 commits into from

Conversation

jfbus
Copy link
Contributor

@jfbus jfbus commented Jan 7, 2019

There is a DNS resolution bug in Kubernetes (UDP response packets get dropped by conntrack, causing timeouts in DNS queries).

The recommended workaround on Linux is to configure the resolver to use TCP for DNS queries, by setting the use-vc option in resolv.conf.

With this PR, the pure Go resolver searches for "use-vc" in resolv.conf and switches to TCP when found.

Fixes #29358

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Jan 7, 2019
@gopherbot
Copy link

This PR (HEAD: edaa76c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/156366 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Jean-François Bustarret:

Patch Set 1:

This is an alternate version of https://go-review.googlesource.com/c/go/+/155378, with a smaller impact. Feel free to reject one of the two.


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 1: Code-Review+1

(4 comments)

This seems reasonable to me given that glibc does this.

And the change looks minimal.


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: 8197318) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/156366 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Jean-François Bustarret:

Patch Set 2:

TODO: add support for OpenBSD (options tcp) and FreeBSD (options usevc)


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: 2b9348a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/156366 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Jean-François Bustarret:

Patch Set 3:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR (HEAD: 70bc00f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/156366 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Jean-François Bustarret:

Patch Set 4:

PR has been rebased and conflicts have been resolved. Ready to review !


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 4: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 4:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=9c0d3f19


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 4: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Apr 18, 2019
There is a DNS resolution bug in Kubernetes (UDP response packets get dropped by conntrack, causing timeouts in DNS queries).

The recommended workaround on Linux is to configure the resolver to use TCP for DNS queries, by setting the use-vc option in resolv.conf.

With this PR, the pure Go resolver searches for "use-vc" in resolv.conf and switches to TCP when found.

Fixes #29358

Change-Id: I26b935cae2c80e5bb9955da83299a8dea84591de
GitHub-Last-Rev: 70bc00f
GitHub-Pull-Request: #29594
Reviewed-on: https://go-review.googlesource.com/c/go/+/156366
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 4:

RELNOTE=yes


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Brad Fitzpatrick:

Patch Set 4: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/156366.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

This PR is being closed because golang.org/cl/156366 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net: add configuration knob to force TCP-only DNS requests in the pure Go resolver on unix
3 participants