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

Node address does not resolve when dc contains capitals #761

Closed
remmelt opened this issue Mar 5, 2015 · 1 comment
Closed

Node address does not resolve when dc contains capitals #761

remmelt opened this issue Mar 5, 2015 · 1 comment
Labels
type/bug Feature does not function as expected
Milestone

Comments

@remmelt
Copy link

remmelt commented Mar 5, 2015

When resolving nodes with capitals, Consul reports that they are unknown.
CLI flags: -server -bootstrap -log-level=debug -dc Dc1
Consul versions tested: 0.4.1 and 0.5.0

I have registered a service 'test-service'.

$ dig @boot2docker -p 8600 test-service.service.consul. SRV

; <<>> DiG 9.8.3-P1 <<>> @boot2docker -p 8600 test-service.service.consul. SRV
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42604
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;test-service.service.consul.   IN  SRV

;; ANSWER SECTION:
test-service.service.consul. 0  IN  SRV 1 1 49171 node1.node.Dc1.consul.

;; ADDITIONAL SECTION:
node1.node.Dc1.consul.  0   IN  A   172.17.0.45

;; Query time: 1 msec
;; SERVER: 192.168.59.103#8600(192.168.59.103)
;; WHEN: Thu Mar  5 15:32:14 2015
;; MSG SIZE  rcvd: 144

The expected result is the correct IP address, as listed in the ADDTIONAL SECTION of the original response.

When doing an additional lookup for the node including the dc:

$ dig @boot2docker -p 8600 node1.node.Dc1.consul. ANY

; <<>> DiG 9.8.3-P1 <<>> @boot2docker -p 8600 node1.node.Dc1.consul. ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 25042
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;node1.node.Dc1.consul.     IN  ANY

;; Query time: 3 msec
;; SERVER: 192.168.59.103#8600(192.168.59.103)
;; WHEN: Thu Mar  5 15:33:46 2015
;; MSG SIZE  rcvd: 39

It does work without the dc:

$ dig @boot2docker -p 8600 node1.node.consul. ANY

; <<>> DiG 9.8.3-P1 <<>> @boot2docker -p 8600 node1.node.consul. ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25971
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;node1.node.consul.     IN  ANY

;; ANSWER SECTION:
node1.node.consul.  0   IN  A   172.17.0.45

;; Query time: 1 msec
;; SERVER: 192.168.59.103#8600(192.168.59.103)
;; WHEN: Thu Mar  5 15:38:40 2015
;; MSG SIZE  rcvd: 68

These examples are using docker-consul but the same results apply when running consul natively.

According to the documentation, this should be supported.

@ryanuber
Copy link
Member

ryanuber commented Mar 5, 2015

Hey @remmelt, this definitely seems a bit odd. Thanks for letting us know, marking as a bug.

@ryanuber ryanuber added the type/bug Feature does not function as expected label Mar 5, 2015
@armon armon added this to the 0.5.1 milestone Apr 9, 2015
@armon armon closed this as completed in ea577fb May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

No branches or pull requests

3 participants