Skip to content
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 prepared query failover: does not translate WAN addresses, SRV returns incorrect datacenter #2220

Closed
maxvt opened this issue Jul 28, 2016 · 1 comment

Comments

@maxvt
Copy link

maxvt commented Jul 28, 2016

Consul version is 0.6.4 for both client and server, running on Ubuntu 14.04.

Description of the Issue (and unexpected/desired result)

When a DNS prepared query fails over to a different datacenter, the result does not translate WAN addresses despite configuration and SRV query returns incorrect datacenter as part of the "hostname".

Reproduction steps

Multiple datacenters with translate WAN enabled. Prepared query that includes a fail over to other datacenters. Service is only available in some datacenters; perform the prepared query using the DNS interface from a datacenter where the service is not available.

A failing test for this scenario and a tentative fix are included in #2219

Log Fragments or Link to gist

-- ~ $ dig my-service.query.consul SRV

; <<>> DiG ---Ubuntu <<>> my-service.query.consul SRV
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: -
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;my-service.query.consul.       IN  SRV

;; ANSWER SECTION:
my-service.query.consul.    0   IN  SRV 1 1 8200 correct-hostname.node.wrong-datacenter.consul.

;; ADDITIONAL SECTION:
correct-hostname.node.wrong-datacenter.consul. 0 IN A   ip-address-local-to-wrong-datacenter

;; Query time: 5 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jul 27 22:08:32 UTC 2016

This looks similar to #2218.

@slackpad
Copy link
Contributor

Fixed in #2219 via #2271.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants