kubernetes: vsphere cloud provider dynamic volume provisioning fails with message "No VM found"

Is this a BUG REPORT or FEATURE REQUEST?: /kind bug /sig sig-vmware

What happened: when try to create pvc using dynamic volume provisioning using storageclass, the status of the pvc is pending forever and below is the kubectl describe pvc output looks like

Events: Type Reason Age From Message Warning ProvisioningFailed 9s (x3 over 26s) persistentvolume-controller Failed to provision volume with StorageClass “thin-disk”: No VM found

What you expected to happen: PVC is successfully created and bound

How to reproduce it (as minimally and precisely as possible): Start kubernetes as vsphere cloud provider, create storage class for vsphere cloud provider and create PVC for storageclass

Anything else we need to know?: When investigate the issue and the kubernetes source a workaround was worked. https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/vsphere/vsphere_util.go func GetNodeUUID(node *v1.Node) (string, error)

the method is suppose to return node UUID if(kubeletVersion < v1.9.4) { return node.Status.NodeInfo.SystemUUID }else{ return “vsphere://”+node.Spec.ProviderID } so since we have kubernetes version v1.12.2 UUID will get get from node.Spec.ProviderID

kubectl get no ubuntu-rnd-02 -o json { “apiVersion”: “v1”, “kind”: “Node”, “spec”: { “podCIDR”: “10.244.2.0/24” }, “status”: { “nodeInfo”: { “systemUUID”: “421F1857-47B2-C797-312D-C2B5D67059D5”, “kubeletVersion”: “v1.12.2”, } } }

Since we have kubernetes version v1.12.2 it should get node UUID from node.Spec.ProviderID but when try to get node details using kubectl get node -o yaml there is no value for node.Spec.ProviderID

By editing kubernetes node resource and adding node.Spec.ProviderID manually and after restarting kube-controller-manager, PVC was created successfully and status was changed to Bounded

apiVersion: v1 kind: Node spec: providerID: vsphere://421FEB34-F754-4D5D-DD3F-672B8B30322F

Environment:

  • Kubernetes version 1.12
  • Cloud provider or hardware configuration: vsphere cloud provider
  • OS (Ubuntu 18.04.1):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

/kind bug /sig sig-vmware

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Same here, this is still an issue for me

This issue was encounter when you add cloud provider to vsphere for an already configured cluster with worker nodes. You should first create kubernetes master with vsphere cloud provider and add worker nodes after that with vsphere cloud provider, node resource will be created with correct node.Spec.ProviderID starting with vsphere://<UUID> as expected

Any update on it? I have this issue too 😦