Skip to content

Attaching a disk uses nodeID to find the VM, which fails if hostname in cluster differs from VM name in VMware #255

Open
@erSitzt

Description

@erSitzt

Describe the bug

Hostname of k8s nodes is a fqdn, VM name in VMware is the short name
Attaching the volume fails, because the VM to attach the volume to is not found.

AttachVolume.Attach failed for volume "pvc-7bbe77fc-bcbb-4413-8b0e-443acb33bb4a" : rpc error: code = Unknown desc = unable to find VM for node [exp-k8s-prod-worker-0001.mydomain.com]: [unable to find vm [exp-k8s-prod-worker-0001.mydomain.com] in vApp [k8s_prod]: [[ENF] entity not found]]

The VM name is just exp-k8s-prod-worker-0001

The VM lookup seems to just use the NodeID

nodeID := req.GetNodeId()
 
vdcManager.FindVMByName(cs.VAppName, nodeID)

Reproduction steps

Use different k8s node name and vm name

Expected behavior

something else :)

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions