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

Using go1.11 breaks memcache DNS lookups #1200

Closed
gouthamve opened this issue Jan 25, 2019 · 15 comments
Closed

Using go1.11 breaks memcache DNS lookups #1200

gouthamve opened this issue Jan 25, 2019 · 15 comments

Comments

@gouthamve
Copy link
Contributor

gouthamve commented Jan 25, 2019

The net library in go1.11+ cannot read SRV responses from kube-dns v1.14.10 or below. This is because kube-dns prior to 1.14.11 used to send compressed SRV responses which is against the spec. See: golang/go#27546 for more details.

We use it here: https://github.com/cortexproject/cortex/blob/master/pkg/chunk/cache/memcached_client.go#L103

This means that we are right now stuck to go1.10. Upgrading cortex to go1.11+ would break memcache lookups among others. The fix for this would be to use https://github.com/miekg/dns like Prometheus does.

/cc @codesome

@codesome
Copy link
Contributor

Found another place where it is used

_, addrs, err := net.LookupSRV(s.service, "tcp", s.hostname)

@codesome
Copy link
Contributor

I am trying to use https://github.com/miekg/dns in it's place.

@bboreham
Copy link
Contributor

Doesn't the query-frontend also do an SRV lookup?
here
to here

@codesome
Copy link
Contributor

Looks like I need to update in 1 more place. Thanks @bboreham!

@codesome
Copy link
Contributor

I don't know about this part of Golang, but would this make this file to be compiled only with go1.8?

@bboreham
Copy link
Contributor

bboreham commented Feb 2, 2019

It means 1.8 and above. See https://golang.org/pkg/go/build/

@codesome
Copy link
Contributor

codesome commented Feb 3, 2019

Yes you are right. I should have searched before asking :)

@gouthamve
Copy link
Contributor Author

This is only a problem when running kubernetes v1.11 or below and compiling Cortex with go v1.11 and above.

@gouthamve
Copy link
Contributor Author

Having said that bumping up kube-dns is straight forward and will fix this. We're on k8s 1.11 but with kube-dns at 1.14.13

@bboreham
Copy link
Contributor

bboreham commented Mar 11, 2019

So there is a more specific problem description involving kube-dns ?
EDIT: description at top has been updated, thanks

@bwplotka
Copy link
Contributor

bwplotka commented Apr 9, 2019

That's funny, we found similar issue on Thanos as well: thanos-io/thanos#1015 obviously same thing with go 1.12

We consider moving to https://github.com/miekg/dns as it allows much much more flexibility. Have you considered this?
EDIT: But it's quite low-level...

@bboreham
Copy link
Contributor

bboreham commented Apr 9, 2019

@bwplotka see #1206 - in the end we decided that upgrading kube-dns would be a better route than changing the software.

@bwplotka
Copy link
Contributor

bwplotka commented Apr 9, 2019

Awesome, thanks for this link, super useful.

@bwplotka
Copy link
Contributor

bwplotka commented Apr 9, 2019

FYI: We added (basic) miekg's option to Thanos: thanos-io/thanos#1016

@tomwilkie
Copy link
Contributor

We decided not to fix this, as we're all on k8s >1.14.

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

No branches or pull requests

5 participants