New NodeUnpublish check in the CSI sanity test suite

Skip to first unread message

Jonathan Dobson

May 5, 2021, 5:02:19 PM5/5/21
to container-storage-interface-community
Hi all,

For CSI driver authors, and other consumers of the csi-sanity test suite:

With the following PR merged, the CSI sanity test now supports validating that TargetPath is cleaned up as part of NodeUnpublish.

Why? The CSI spec states that the SP MUST delete the file or directory that it created as part of NodeUnpublishVolume. This adds a new scenario to the sanity test to verify that NodeUnpublishVolume removes TargetPath.

Actions needed:
1) If you maintain a driver, please ensure that NodeUnpublishVolume adheres to the spec and removes the TargetPath. Removal of TargetPath by the kubelet will be deprecated starting in Kubernetes 1.22 (see and this should be handled by the driver instead.
2) If you are using using the --csi.createmountpathcmd CLI option with csi-sanity, this test will be skipped until you add the --csi.checkpathcmd CLI option to provide a way to check whether a given path exists. The same is true for consumers using custom callback functions as part of TestConfig (i.e. CreateTargetDir and CheckPath).

Thank you.
Reply all
Reply to author
0 new messages