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

Consul integration fails to detect leader when using ipv6 #18707

Open
michaz opened this issue Sep 28, 2024 · 0 comments
Open

Consul integration fails to detect leader when using ipv6 #18707

michaz opened this issue Sep 28, 2024 · 0 comments

Comments

@michaz
Copy link

michaz commented Sep 28, 2024

Steps to reproduce the issue:

  1. Set up a Consul cluster where Consul binds to ipv6 addresses
  2. Enable Datadog-Consul integration

Describe the results you received:
Service and catalog checks are skipped on every instance, including the leader.

Describe the results you expected:
Service and catalog checks are performed on the leader.

Additional information you deem important (e.g. issue happens only occasionally):
The integration seems to think that no instance is the leader. I think this is because leadership is determined by string-comparing IP addresses, and that fails on ipv6 because the address format is different between the left-hand side and the right-hand side.

And that's because the address in Member.Addr that is returned by Consul's API isn't in brackets, unlike many other ipv6 addresses returned by Consul.

Maybe there is a more robust way to find out if the local Consul node is the leader.

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

1 participant