I am seeing an issue in Consul 0.7.1 and Vault 0.6.3 (not necessarily exclusive to these versions) in regards to the "vault" service that Vault auto-registers to Consul.
Specifically, If I do a DNS lookup on the generic "vault" service without the "active" or "standby" tag, I get back two CNAMES:
$ dig @localhost -p 8600 vault.service.oregon.consul
[...]
;; ANSWER SECTION:
vault.service.oregon.consui. 0 IN CNAME vault-node-002.node.oregon.consul.
vault-node-002.node.oregon.consuli. 0 IN A 172.29.26.198
vault.service.oregon.consul. 0 IN CNAME vault-node-001.node.oregon.consuli.
I believe this (returning multiple CNAMES for the same name) violates RFC 1034 Section 3.6.2. This is a problem (and the reason I even noticed it) is that some downstream recursors (Bind in this case) will simply reject this behavior and return a SERVFAIL when this happens.
Typically, I have always seen Consul simply return multiple A records for a service (no CNAMES), and of course, this is entirely proper and RFC-compliant and works fine:
$ dig @localhost -p 8600 foo.service.oregon.consul
[...]
;; ANSWER SECTION:
foo.service.oregon.consuli. 0 IN A 172.29.25.111
foo.service.oregon.consuli. 0 IN A 172.29.25.82
foo.service.oregon.consuli. 0 IN A 172.29.26.93
I'm not sure what is different about the Vault service registration, or why Consul is exhibiting what seems to me to be non-comlpliant behavior, at lest as far as the RFC is concrned.
I initially raised this on the Vault Google Group and here is the URL to that thread, just for reference:
Best,
Rusty