kubernetes-csi / csi-test

CSI test frameworks
Apache License 2.0
151 stars 147 forks source link

missing test that filesystem snapshot cannot be created from block volume, and vice versa #541

Open ebblake opened 1 month ago

ebblake commented 1 month ago

Right now, the csi-sanity tests are hardcoded to either always request filesystem (mount) volumes, or to always request block volumes, based on --csi.testvolumeaccesstype XXX (at the csi-sanity CLI).

It might be nice if the CSI spec added a controller capability to advertise whether the controller can create block, filesystem, or both types of volumes, and if csi-sanity then probed that controller capability and auto-determined testvolumeaccesstype accordingly rather than defaulting to filesystem and having to manually be set to block for a block-only driver. (I'll probably create a bug request against CSI proper for that)

But more to the point of this particular request, we noticed while implementing a CSI driver that was originally block only, but where we are now adding filesystem support, that the csi-sanity test has no way to validate that we are not attempting the invalid task of trying to create a block volume backed by a filesystem snapshot: https://gitlab.com/kubesan/kubesan/-/merge_requests/45#note_1960468190