time out for task Task:<task-id> before response from CNS.kubectl logs -n vmware-system-csi <pod-name> -c vsphere-syncer
Err: time out for task Task:<task-id> before response from CNS"
kubectl describe pod <pod-name>
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedAttachVolume 59m (x2 over 61m) attachdetach-controller AttachVolume.Attach failed for volume "pvc-<pvc-id>" : rpc error: code = Internal desc = observed Error: "time out for task Task:<task-id> before response from CNS" is set on the volume "b5a#####-####-####-####-##########-<pvc-id>" on virtualmachine "<node-name>"
The issue is caused by a race condition in the CSI driver task monitoring implementation while waiting for Cloud Native Storage task completion
To resolve this issue, perform the following upgrades based on your environment:
vSphere Supervisor
Vanilla Kubernetes Clusters
Workaround
kubectl rollout restart deployment csi-controller -n vmware-system-csiThis issue was also addressed in a future upstream vsphere-csi-driver version in Kubernetes - see: https://github.com/kubernetes-sigs/vsphere-csi-driver/pull/3584