-
Notifications
You must be signed in to change notification settings - Fork 136
possible malformed response with large responses #326
Comments
Zookeeper:
Mesos master:
Mesos slave:
mesos-dns
having mesos-dns as the primare dns server:
start mesos 10 tasks each having 5 port mappings, i.e. using marathon:
When we run the following program
The above mentioned error message is being generated |
Go adheres to https://tools.ietf.org/html/rfc1035 and limits the maximum DNS response size to 512 bytes, see https://github.com/golang/go/blob/release-branch.go1.5/src/net/dnsclient_unix.go#L43. |
xref hashicorp/consul#854 |
xref #237 |
/cc @discordianfish |
Compression is already introduced in b204a79, so that card is played already. |
In general, an answer can be larger than 512 bytes, in that case EDNS is used (not supported by go / netgo) or it falls back to TCP for resolution (which golang should do). From the server side we just need to make sure that we set the truncated bit if the answer doesn't fit into 512 bytes. |
Just verified: We set the truncated flag, but it seems like we also need to make sure that what we send back is complete. I've created a branch to fix the issue, but I haven't tested it yet: https://github.com/mesosphere/mesos-dns/compare/fish/fix-truncate?expand=1 |
In particular, note the
length 740
. This manifests as SRV record lookup failures in go. Dig works, however, so it's not clear if we are mishandling large responses or if go's srv lookup code is buggy. Go is able to resolve small responses, when I only query for _leader._tcp.mesos. I'm working around this in etcd-mesos by providing discoveryinfo that will limit the size of the response.The text was updated successfully, but these errors were encountered: