-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
DNS Query for SRV Answer Truncated to Nothing #1931
Comments
Hi @bkendall can you confirm which version of Consul you are using? There were some recent changes in 0.6.4 in this area but I don't think they would have caused this. You are correct we should probably trim the additional section in parallel to prevent a situation like this. |
I first found this behavior on |
Ah ok this is the trimming behavior added in 0.6.4, since we used to just trim the answer list to a fixed size before. Thanks for the report - we will get this fixed! |
You're very welcome. For those interested in possibly making a PR (I may be), would the desired behavior be to trim down the |
This is a little tricky because you may legitimately have multiple entries for the same host in the
|
Are there any developments to this bug? |
Hi @xytis this will be fixed for sure by the next release of Consul. Current workaround would be to use DNS over TCP or an older version of the agent. Sorry about that! |
I was working with a small cluster this evening and registered 9 redis machines into my consul services catalog. When I went to dig for the
SRV
records, however, I noticed that I did not receive any answer section:All of those machines (nodes) in the
ADDITIONAL
section are correct. I did a bit of searching and found theenable_truncate
flag, which I set, and got the same lack of answer when querying using UDP (however, now that the truncate flag was set,dig
became smart enough to query using TCP and received the entireANSWER
section).This leads me to the following question: is removing the entire
ANSWER
section appropriate? I found the logic in the code that sees that the length of the message is too long and removesANSWER
entries until there are no moreANSWER
s or it's under the size limit (dns.go), but I don't know enough about the DNS and it's implementation to know the correct answer to that. It seems to me that completely removing theANSWER
section in favor of theADDITIONAL
section is bizarre. I would (maybe naïvely) expect both sections to be trimmed down the same hosts/entries so there a maximum, equal number of them.Any thoughts?
For what it's worth, here's the response after
enable_truncate
is in place. Working perfectly now:The text was updated successfully, but these errors were encountered: