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
Fix IPv6 addresses lost issue in pure ipv6 vsphere environment #86001
Conversation
Hi @hubv. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
please help to review and merge |
/assign @BaluDontu |
/ok-to-test |
/assign @frapposelli |
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
@hubv thanks for this PR! /lgtm /cc @dvonthenen @andrewsykim PTAL, not sure if this was already fixed in out-of-tree |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frapposelli, hubv The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@frapposelli thanks for the heads up! IPv6 support was addressed in the external provider a few weeks back. |
/cc |
@hubv: GitHub didn't allow me to request PR reviews from the following users: hubv. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…pstream-release-1.17 Automated cherry pick of #86001: Fix IPv6 addresses lost issue in pure ipv6 vsphere
What type of PR is this?
/kind bug
What this PR does / why we need it:
with this bug fix, k8s could get both ipv6/ipv4 addresses from vsphere platform, meanwhile k8s could ignore link-local addresses while retrieves VM’s IP.
VMware tools can collect IP addresses on VM, and provide them to k8s.
those IP addresses contain both ipv4/ipv6 addresses, and some useless link-local addresses
e.g.
From the code
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go#L682-L700
we can know that while the provider retrieves VM’s IP, It uses To4() function for all IP addresses from vsphere platform, this function will ignore all ipv6 address, and can't filter out ipv4 link-local addresses.
It will cause IPv6 addresses lost in node status.
and we can't use helm in a vsphere pure ipv6 env
In this PR, we use !ParseIP(ip).IsLinkLocalUnicast() to retrieves VM’s IP
we can get ipv6 address in node status by this fix, and can use helm in a pure ipv6 vsphere env
Which issue(s) this PR fixes:
Fixes #85886 #83584
Special notes for your reviewer:
Does this PR introduce a user-facing change?: