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

Ensure Consul is IPv6 compliant #5468

Merged
merged 5 commits into from
Jun 4, 2019
Merged

Conversation

pierresouchay
Copy link
Contributor

Ensure that when we format address:port if the address is IPv6, we
format it using "[%s]:%d" instead of "%s:%d".

This should fix #5460

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great and while I have no doubt that this would fix the issue would there be any way to add some tests for this? Even if CI might have to skip them for not supporting IPv6 I think they would still be a worthwhile addition.

@pierresouchay
Copy link
Contributor Author

@mkeeler Yes, I am gonna add a few test in next commit

@pierresouchay
Copy link
Contributor Author

@mkeeler @rboyer Do you want more test than what I added or is it enough?

Ensure that when we format address:port if the address is IPv6, we
format it using "[%s]:%d" instead of "%s:%d".

This should fix hashicorp#5460
We ensure that `sidecarServiceFromNodeService` default check use the same IP as sidecar.Proxy.LocalServiceAddress

If we enforce ipv6 address there, the check will be correct.

Added unit test with both IPv4 and IPv6 to ensure the TCP check is correct
@pierresouchay
Copy link
Contributor Author

@mkeeler @rboyer Is it Ok, or do you need other additional tests since I added a few tests after your last comments?

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkeeler mkeeler merged commit 4a4c63b into hashicorp:master Jun 4, 2019
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

Successfully merging this pull request may close these issues.

proxy address format is not IPv6 compatible
3 participants