-
Notifications
You must be signed in to change notification settings - Fork 799
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
Use miekg/dns for SRV lookup #1206
Conversation
Looks good so far; lint needs fixing, and there was some mention of gRPC also using LookupSRV for querier -> frontend comms. |
I opened grpc/grpc-go#2634 to help with the gRPC side. |
Thanks @tomwilkie! |
Note the gRPC PR was rejected |
Hmm, as far as I see, the grpc resolver uses If that fails, it falls back to simple A record lookup: https://github.com/grpc/grpc-go/blob/master/naming/dns_resolver.go#L261-L267 I found that in the clusters we run, we don't expose a port-named |
I'm happy with A record lookup. |
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.
A. Do we really have to do this? This says the underlying issue can be addressed by upgrading kube-dns.
B. One of the seven commits claims to move from udp to tcp; the PR description says nothing about this. I'd like that addressed; also I'd like to know about performance impact before approving.
C. The description of the problem at #1200 remains imprecise.
A: We don't need to do it if we're okay asking people to upgrade kube-dns Use miekg/dns instead of native DNS library to be compatible with kube-dns C: The problem is that |
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Also use TCP for the DNS lookup Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Also make sure that we check for search domains Revert the TCP lookup change and fallback to UDP Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
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.
Thanks for the feedback @bboreham. I'm LGTM on this, keen to unblock the move to go modules and go 1.12.
Still feels like a bad idea to me. |
What feels bad about it? Can I infer from your comments you'd prefer to upgrade go without this, effectively making Cortex not work on kube-dns <1.14.11?
Thats a different PR; lets address that there, it shouldn't block this. |
It's adding 70 lines of code in a client to work around an issue in a server which was fixed months ago. Are there reports from people who use or would like to use Cortex and cannot upgrade kube-dns? Also I think there should be comments in the code
|
Hmm, I'm going to hold off on this PR until someone actually raises an issue and proceed with Go 1.12 upgrade. We might just be optimising for something that has been fixed already as you point out. |
@khaines on the call yesterday we decided we probably didn't need this, but we just want to check you've got an update kubedns? |
No word from @khaines. I'll close, we can reopen if needs be. |
Fixes #1200
EDIT (by @gouthamve): This uses miekg/dns library to do the SRV lookups. We are using this in the grpc codebase as there is a A record fallback when SRV lookups fail.