vSphere CSI Driver - v2.0.0 release
New Feature
- Offline Persistent Volume expansion for Block Volume.
- ReadWriteMany volumes using vSAN file services.
- Support for enabling leader election to ensure High Availability for vSphere CSI driver.
Notable Changes
- Support for enabling leader election to ensure High Availability for vSphere CSI driver.
- Enhanced driver to ensure volume operations are idempotent.
- Enhanced driver logging and debuggability with contextual log tracing.
Deployment files
Minimum Kubernetes Version
- v1.16.0
Supported sidecar containers versions
- csi-provisioner - v1.4.0
- csi-attacher - v2.0.0
- csi-resizer - v0.3.0
- livenessprob - v1.1.0
- csi-node-driver-registrar - v1.2.0
Known Issues
vSphere CSI Driver issues
- Unused volumes not deleted during full sync when CSI driver v2.0.0 is used with vSphere 6.7 Update3.
- Impact: Full sync in CSI v2.0.0 does not delete unused volumes in vSphere 6.7 Update3.
- Workaround: If you are using vSphere 6.7 Update3 with
v2.0.0
release of the driver, it is recommended to use v2.0.1 release of the driver.
Volume never gets detached from the node if volume is being deleted before it is detached from Node VM.
- Reasons volume gets into this state are
- CSI provisioner is issuing delete call before volume is detached.
- vCenter API in
vSphere 67u3
is not marking volume back as Container Volume when Delete call fails while Volume is attached to the Node VM. This issue is fixed in the vSphere 7.0.- On vSphere 67u3, issue can be fixed by upgrading driver to v2.0.1 release.
- Impact: When Pod and PVC are deleted together upon deletion of namespace, we have a race to delete and detach volume. Due to this, Pod remains in the terminating state and PV remains in the released state.
- Upstream issue was tracked at: https://github.com/kubernetes/kubernetes/issues/84226
- Workaround:
- Delete the Pod with force:
kubectl delete pods <pod> --grace-period=0 --force
- Find VolumeAttachment for the volume that remained undeleted. Get Node from this VolumeAttachment.
- Manually detach the disk from the Node VM.
- Edit this VolumeAttachment and remove the finalizer. It will get deleted.
- Use
govc
to manually delete the FCD. - Edit PV and remove the finalizer. It will get deleted.
- Delete the Pod with force:
- Reasons volume gets into this state are
When the static persistent volume is re-created with the same PV name, volume is not getting registered as a container volume with vSphere.
- Impact: attach/delete can not be performed on the such Persistent Volume.
- Workaround: wait for 1 hour before re-creating static persistent volume using the same name.
- Metadata syncer container deletes the volume physically from the datastore when Persistent Volumes with
Bound
status and reclaim policyDelete
is deleted by the user whenStorageObjectInUseProtection
is disabled on Kubernetes Cluster.- Impact: Persistent Volumes Claim goes in the lost status. Volume can not be recovered.
- Workaround: Do not disable
StorageObjectInUseProtection
and attempt to delete Persistent Volume directly without deleting PVC.
- deployment yaml uses
hostPath
volume in the CSI driver deployment for unix domain socket path.- Impact: when the controller Pod does not have access to the file system on the node VM, driver fails to create socket file and thus does not come up.
- Workaround: use
emptydir
volume instead ofhostPath
volume.
- Volume expansion might fail when it is called with pod creation simultaneously.
- Impact: Users can resize the PVC and create a pod using that PVC simultaneously. In this case, pod creation might be completed first using the PVC with original size. Volume expansion will fail because online resize is not supported in vSphere 7.0 Update1.
- Workaround: Wait for the PVC to reach FileVolumeResizePending condition before attaching a pod to it.
- Deleting PV before deleting PVC, leaves orphan volume on the datastore
- Impact: Orphan volumes remain on the datastore, and admin needs to delete those volumes manually using
govc
command. - Upstream issue is tracked at: https://github.com/kubernetes-csi/external-provisioner/issues/546
- Workaround:
- No workaround. User should not attempt to delete PV which is bound to PVC. User should only delete a PV if they know that the underlying volume in the storage system is gone.
- If user has accidentally left orphan volumes on the datastore by not following the guideline, and if user has captured the volume handles or First Class Disk IDs of deleted PVs, storage admin can help delete those volumes using
govc disk.rm <volume-handle/FCD ID>
command.
- Impact: Orphan volumes remain on the datastore, and admin needs to delete those volumes manually using
Kubernetes issues
- Filesystem resize is skipped if the original PVC is deleted when FilesystemResizePending condition is still on the PVC, but PV and its associated volume on the storage system are not deleted due to the Retain policy.
- Issue: https://github.com/kubernetes/kubernetes/issues/88683
- Impact: User may create a new PVC to statically bind to the undeleted PV. In this case, the volume on the storage system is resized but the filesystem is not resized accordingly. User may try to write to the volume whose filesystem is out of capacity.
- Workaround: User can log into the container to manually resize the filesystem.
- Volume cannot be resized in a Statefulset or other workload API such as Deployment.
- Issue: https://github.com/kubernetes/enhancements/pull/660
- Impact: User cannot resize volume in a workload API such as StatefulSet.
- Workaround: None
- Recover from volume expansion failure.
- Impact: If volume expansion fails because storage system does not support it, there is no way to recover.
- Issue: https://github.com/kubernetes/enhancements/pull/1516
- Workaround: None
vSphere issues
- CNS file volume has a limitation of 8K for metadata.
- Impact: It is quite possible that we will not be able to push all the metadata to CNS file share as we need support a max of 64 clients per file volume.
- Workaround: None, This is vSphere limitation.