We have traced the issue to the Kubernetes DNS server, kube-dns. It is 
returning compressed hostnames in SRV query responses. It can be reproduced 
by running 

The following app exits with an error in MiniKube (or any other Kubernetes 
cluster with kube-dns). 

cannot unmarshal DNS message - Target: compressed name in SRV resource data

func main() {
  _,_, err := net.LookupSRV("dns-tcp", "tcp", "kube-dns.kube-system")
  if err != nil {
    log.Fatal(err)
  }
}

Is it worth creating an issue around this? We have extracted the DNS client 
from `net` and are currently using it with the compressed flag enabled to 
allow compressed hostnames - the behavior that existed in go 1.10 and 
earlier.


On Wednesday, August 29, 2018 at 4:57:04 PM UTC-6, Jason Newman wrote:
>
> This code works in our Kubernetes cluster when compiled with Go 1.10 and 
> does not work when compiled with Go 1.11, we are using the built-in Go 
> resolver.
>
> https://play.golang.org/p/JNSJEm1n6hg
>
> On Wednesday, August 29, 2018 at 4:28:54 PM UTC-6, Nathan Fisher wrote:
>>
>> Can you share examples?
>> On Wed, Aug 29, 2018 at 19:08, <ja...@squarepenguin.com> wrote:
>>
>>> We are using SRV records in Kubernetes for various purposes and Go 1.11 
>>> no longer supports compressed names in SRV resource data (
>>> https://github.com/golang/net/commit/24dd3780ca4f75fed9f321890729414a4b5d3f13#diff-47e2241916c7047eab73daf76c89fc3fR2055).
>>>  
>>> The error we are getting is "cannot unmarshal DNS message" and the 
>>> underlying error is "Target: compressed name in SRV resource data".
>>>
>>> Ultimately, we believe the issue lies with dnsmasq returning a 
>>> non-compliant SRV response, but it is stopping us from upgrading to Go1.11. 
>>> Are there any known workarounds which would allow us to handle these 
>>> noncompliant SRV responses?
>>>
>>>
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> - sent from my mobile
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to