-
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
Auto-populated protocol-specific tagged addresses do not respect default tags #8525
Comments
@pierresouchay do you have any thoughts about this? |
@ShimmerGlass Any opinion on this? |
This looks like an oversight in the original PR. Reverting the change would indeed solve the issue, but would be a step back for dual-stack support in Consul which is needed in our shop. Additionally, the I see two ways to fix that :
|
Hello @pierresouchay, hello @ShimmerGlass, could this commit be a possible solution? At least it fixes the problem with the incorrect/differing WAN IP |
@andrewoelfing It might, do you handle the case where the WAN address is a domain, not an IP? |
Hello @ShimmerGlass, the documentation says the parameter only takes ip and port (or go-sockaddr templates). |
Hi @andrewoelfing, thank you for the reference commit. After taking a look at this I think it's preferable to address this bug in the agent code rather than in the I pushed a PR to address this issue. |
We currently populate the tagged addresses for ipv4 and ipv6 from the service address if the service address is ipv4/6 and there is no existing address tagged as
wan_ipv4/6
.That means that if someone adds a plain
wan
tagged address, thewan_ipv4/6
will be inherited from the service address and not the user-providedwan
address.Repro steps:
consul agent -dev
consul connect envoy -gateway=mesh -register -wan-address 192.168.0.4:8080 -address '{{ GetInterfaceIP "en0" }}'
curl http://127.0.0.1:8500/v1/agent/services
Notice that the
wan
andwan_ipv4
addresses differ.One potential solution here is to revert the tagged address defaulting in
addServiceInternal
that was added in #6640. This way only addresses specified by the user are present in theTaggedAddresses
map. Modifying a provided service registration has been surprising to some users.The text was updated successfully, but these errors were encountered: