-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Support retrieving the VM UUID on Windows #71147
Support retrieving the VM UUID on Windows #71147
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
/sig windows |
/sig vmware |
/check-cla |
/retest |
thank you for this PR @benmoss /retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the wmic csproduct get UUID
usage SGTM 👍
Signed-off-by: Ben Moss <bmoss@pivotal.io>
@neolit123 squashed as you requested |
@neolit123 what needs to happen for this to get merged? |
/assign @SandeepPissay the project is fairly low activity before xmas and ny. |
@benmoss, The code changes looks good to me. Have you tested that vSphere Cloud Provider works in all cases if k8s cluster is deployed as Windows VMs on vSphere? |
@SandeepPissay yup, as far as we've understood the functionality everything seems to work with this. |
cc @michmike can you take a look? |
/assign @frapposelli @dougm hi, can you please take a look for approval here too? |
The approach is sane, I don't have the necessary Windows knowledge to validate the UUID retrieval method but /lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@dvonthenen may want to review too. We should also open an issue for porting this to the external vSphere CCM.
@dougm We use the UUID reported by the kubelet. If the kubelet populates the SystemUUID property correctly, this should automatically work for Windows systems without any code changes. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benmoss, frapposelli 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 |
/retest |
Having trouble getting windows nodes to find vm id with 1.14 beta.1:
On linux, the
To return the equivalent form on Windows, it looks like the following can be used:
or
BUT the current implementation uses
So is It appears the logic was correct at the time of opening the PR. However, in light of the change on the linux side from |
On windows, the systemUUID does not currently get populated because of how cadvisor discovers it (https://github.com/google/cadvisor/blob/master/utils/sysfs/sysfs.go#L237). |
@rhockenbury Yes, the |
Yes, but this makes the assumption that the uuid and serial are the same, which is only true on some vm versions. vmware-archive#450 (comment), vmware-archive#450 (comment) |
Agreed, from what I remember of why I chose |
I don't have an environment set up where I could get a PR out quickly. Possibly by end of week, so if someone else is able and willing to get to it sooner, please go for it. Would this need to be in by code freeze (3/7) to make it into the 1.14 release? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds support to the vSphere cloud provider for retrieving a VM's UUID when running on Windows.
Special notes for your reviewer:
On linux VMs, there is a file with the UUID in it. On windows, this file does not exist, so we use the
wmic
CLI tool to get the same value.Does this PR introduce a user-facing change?: