-
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
SRV records that point to names that don't resolve to the service's IP #832
Comments
I guess I'm a bit confused here. We are already returning the A record of the node along with the SRV record. Is the issue that the service address is different than the node address? |
The issue is related to the fact that the service address is different from the node address. The SRV response includes the service address under the node's name, but in this instance I have software (srv-router) that ignores that and just does a separate lookup for the node address returned by the SRV request, which is not correct for the service. It's possible that this is a bug in how srv-router is handling the lookup, but it would not surprise me if this were a common thing in other software too, so it's probably better to handle this more systematically. One thought occurred to me for something like having the SRV response change to |
Here's some output that illustrates what I'm talking about.
When I try to use It seems like the answer shouldn't change depending on how the user asks. |
The node name consul returns in the answer section represents the consul agent and not the domain name of the host running the service. Shouldn't that be the case? |
IMO, it should be the case that it returns a name representing the service itself, which might (and in this case does) have a different IP for various reasons. In the original answer, it gives this IP for that node's hostname in the additional info section, which is... kinda right:
But then if anything else asks for that hostname in other contexts, it gets the node's actual IP:
I think it would be better to have services resolve to a hostname representing the service, which would always resolve to the service's IP. |
@treed Sorry about the delay. I agree. I guess for the SRV lookups we should use a special FQDN that is I'll mark this as a thinking bug. |
I'm seeing the exact same behaviour with Consul - also using the above mentioned
but the subsequent A record lookup returns
which is different from the A record returned in the 'ADDITIONAL SECTION' in the first SRV lookup. |
Any update on this? Really disappointing bug. Why not return service address in SRV answer section? |
Any update on this? |
This bug makes consul unusable with go's |
This also makes consul somewhat unusable with node's native dns.resolveSrv |
A simple fix for this would be something like a new Consul DNS handler for names like |
Increase the memory for the client daemonset's tls-init container. We saw an out of memory error when running on OpenShift.
I'm having an issue where:
It seems reasonable to me that SRV records could respond with an FQDN that leads to the service itself, although I'm not sure how that would look.
I'm also unsure if the behavior of this software (srv-router in this case) is typical, but it would not surprise me if this came up in other instances.
The text was updated successfully, but these errors were encountered: