-
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 changed to addr instead of node format #7360
Comments
Agree, we're running into the same issue here as well:
We leverage This is definitely a breaking change. |
I'm seeing the same and wondering where the |
For now we're passing Consul 1.6.5 previous answer format which includes the node to work around it:
|
Bump on this issue please. Is there any way we can help speed up this issue? |
I forgot to mention this in the OP: This was broken in #6792 and given the commit message says:
This seems intentional. |
I just ran into this as well when trying to upgrade from 1.6.1, and found that, as you say above, the behavior was changed between 1.6.9 and 1.7.0. Unfortunately, it's been this way for a year now, and I don't think it's going to be reverted so I'll have to figure out a workaround. |
Bump on this issue. Fix it please or suggest any workaround. We have the same problem upgrading consul from 1.4 to 1.11 and this is blocking us. |
Hi folks, I dug into this a bit to understand the difference in SRV response behavior before and after Consul 1.7.0. I only able to reproduce this behavior with a specific service registration configuration. Below are my findings.
The undocumented # agent-config.hcl
# Node's IP
bind_addr = "203.0.113.0"
services {
name = "apache"
# Service is configured with a different IP
address = "192.0.2.10"
port = 80
}
PR #6792 was meant to fix bug where if a service was registered with the address parameter set to an FQDN, Consul incorrectly returned a CNAME record in the SRV target field of the DNS answer section which is a violation of RFC2782.
For example: Behavior on Consul 1.6.10
After the fix: Consul 1.7.0 and later
That PR, however, introduced a change in behavior that is the source of this bug report. Prior to 1.6.x, if an Lines 1522 to 1540 in 2e5c86c
In Consul 1.7.0 and later, this was changed to always return Lines 1813 to 1840 in f3ac9da
Based on my testing, this can be resolved by removing the
For example services {
name = "apache"
# Service is configured with an explicit Address
address = "192.0.2.10"
port = 80
} becomes services {
name = "apache"
port = 80
} If for some reason you are seeing the Thanks! |
I discovered that this isn't possible with Nomad because Nomad always populates the https://github.com/hashicorp/nomad/blob/v1.2.3/command/agent/consul/service_client.go#L1133-L1147 |
@blake thanks for the clarification. I can confirm that removing the address from the registration fixes this. |
Overview of the Issue
Previously SRV records looked like:
but with 1.7.1 they now look like:
Reproduction Steps
We had previously relied on the output to be in the format
<node>.node.<dc>.admiral
but now it looks like it's changed to<random?>.addr.<dc>.admiral
. I don't see anything in the CHANGELOG mentioning this, was it intentional or accidental? Can we choose the behavior?Consul info for both Client and Server
Client info
Server info
Operating system and Environment details
CentOS 7 on GCE
Log Fragments
N/A
The text was updated successfully, but these errors were encountered: