-
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
consul does not resolve CNAME to A-record for local service #1228
Comments
+1 |
Enabling
Btw cname resolution works but with 100% CPU usage 👎 Any idea? |
Hi @cdosso can you provide an example that gets into this state? Your issue should probably be filed separately from this one, which looks like an enhancement. |
+1 @nilsotto |
+1 |
label enhancement seems not appropriate. Without recurse DNS is not usable in many cases |
@goacid that's fair - changing to a bug. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Any progress on this issue? |
same question here: any progress on this? Would be nice to remove the dnsmasq hack we currently have to use :) |
Any good workarounds for this issue that do not involve enabling recursor mode? |
Fixed in #2444 |
+1 |
When registering an external service in the catalog (https://www.consul.io/docs/guides/external.html), consul returns a CNAME-record on the dns-interface.
Adding the recursors config option makes consul resolve the A-record an return that as well.
However, consul should always resolve CNAMEs for internal services.
example
consul 0.5.2, started like this :
consul agent --client 0.0.0.0 --server --data-dir . --bootstrap-expect 1
(Using httpie as a curl alternative:)
This registers the internal service
srvtest1.service.consul
and the aliassrvalias1.service.consul
When querying the consul DNS for the alias, i would expect the CNAME to be resolved, but it is not.
$ dig @localhost -p 8600 srvalias1.service.consul ---- snip ---- ;; ANSWER SECTION: srvalias1.service.consul. 0 IN CNAME srvtest1.service.consul.
However, when I start consul with the parameter
--recursor localhost:8600
, the CNAME is resolved to its correct A recordexpected behaviour
Consul should consider if the external service is on the local domain and resolve CNAME->A accordingly without consiguring a recursor,
The text was updated successfully, but these errors were encountered: