• Kubernetes Submit Queue's avatar
    Merge pull request #59519 from vmware/vm_uuid_provider_id · c0a337d4
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Report InstanceID for vSphere Cloud Provider as UUID obtained from product_serial file 
    
    **What this PR does / why we need it**:
    vSphere Cloud Provider is not able to find the nodes for VMs created on vSphere v1.6.5. Kubelet fetches SystemUUID from file ```/sys/class/dmi/id/product_uuid```. vSphere Cloud Provider uses this uuid as VM identifier to get node information from vCenter. vCenter v1.6.5 doesn't recognize this uuids, as a result, nodes are not found. 
    
    UUID present in file ```/sys/class/dmi/id/product_serial``` is recognized by vCenter. Yet,  Kubelet doesn't report this. Therefore, in this PR InstanceID is reported as UUID which is fetched from file 
    ```/sys/class/dmi/id/product_serial```.
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Fixes https://github.com/kubernetes/kubernetes/issues/58927
    
    **Special notes for your reviewer**:
    Internally review here: https://github.com/vmware/kubernetes/pull/452
    
    Tested:
    Launched K8s cluster using kubeadm (Used Ubuntu VM compatible with vSphere version 6.5.)
    _**Note: Installed Ubuntu from ISO**_
    Observed following:
    ```
    Master
    > cat /sys/class/dmi/id/product_uuid
    743F0E42-84EA-A2F9-7736-6106BB5DBF6B
    
    > cat /sys/class/dmi/id/product_serial
    VMware-42 0e 3f 74 ea 84 f9 a2-77 36 61 06 bb 5d bf 6b
    
    Node
    > cat /sys/class/dmi/id/product_uuid
    956E0E42-CC9D-3D89-9757-F27CEB539B76
    
    > cat /sys/class/dmi/id/product_serial
    VMware-42 0e 6e 95 9d cc 89 3d-97 57 f2 7c eb 53 9b 76
    ```
    With this fix controller manager was able to find the nodes.
    **controller manager logs**
    ```
    {"log":"I0205 22:43:00.106416       1 nodemanager.go:183] Found node ubuntu-node as vm=VirtualMachine:vm-95 in vc=10.161.120.115 and datacenter=vcqaDC\n","stream":"stderr","time":"2018-02-05T22:43:00.421010375Z"}
    ```
    
    
    **Release note**:
    
    ```release-note
    vSphere Cloud Provider supports VMs provisioned on vSphere v1.6.5
    ```
    c0a337d4
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
examples Loading commit data...
hack Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.bazelrc Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.kazelcfg.json Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG-1.10.md Loading commit data...
CHANGELOG-1.2.md Loading commit data...
CHANGELOG-1.3.md Loading commit data...
CHANGELOG-1.4.md Loading commit data...
CHANGELOG-1.5.md Loading commit data...
CHANGELOG-1.6.md Loading commit data...
CHANGELOG-1.7.md Loading commit data...
CHANGELOG-1.8.md Loading commit data...
CHANGELOG-1.9.md Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
SUPPORT.md Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...