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

Replace endpoint.ParseHostPort with net.SplitHostPort to fix IPv6 client endpoints #11211

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented Oct 8, 2019

Fixes kubernetes/kubernetes#83550

Manually verified fix:

etcd --listen-client-urls="https://[::1]:2379" --advertise-client-urls="https://[::1]:2379" --cert-file=integration/fixtures/server-ipv6.crt --key-file=integration/fixtures/server-ipv6.key.insecure

etcdctl --cacert ~/projects/etcd-io/src/go.etcd.io/etcd/integration/fixtures/server-ipv6.crt --endpoints="https://[::1]:2379" get / --write-out json
{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":1,"raft_term":5}}

We need a automated test for this too. Since we don't have any IPv6 tests in etcd, we need to enable that test carefully, since it would fail in environments without IPv6 enabled. We will do that as a follow up PR.

Regenerated all the test certs after adding one with an IPv6 IP for the manual test. We'll keep the cert around for when we add the automated test.

cc @liggitt @gyuho @jingyih @wenjiaswe @YoyinZyc @hangxie

@jpbetz jpbetz self-assigned this Oct 8, 2019
@jpbetz jpbetz added the type/bug label Oct 8, 2019
@jpbetz jpbetz added this to the etcd-v3.5 milestone Oct 8, 2019
@neolit123
Copy link

LGTM, thanks for the quick fix.

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the quick fix

@neolit123
Copy link

given kubernetes/kubernetes is at 3.3.15 would it be possible to also backport for 3.3?

@wenjiaswe
Copy link
Contributor

lgtm, thanks Joe! +1 on backporting to 3.3, ref: kubernetes/kubernetes#83209 (comment)

@jpbetz jpbetz merged commit 6aae903 into etcd-io:master Oct 8, 2019
jpbetz added a commit that referenced this pull request Oct 9, 2019
…-origin-release-3.3

Automated cherry pick of #11211
jpbetz added a commit that referenced this pull request Oct 9, 2019
…-origin-release-3.4

Automated cherry pick of #11211
@jingyih jingyih mentioned this pull request Nov 13, 2019
spzala added a commit to spzala/etcd that referenced this pull request Dec 2, 2019
spzala added a commit to spzala/etcd that referenced this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1.16: etcd client does not parse IPv6 addresses correctly when members are joining
5 participants