Why is this PR required? What issue does it fix?:
This resolves the issue listed in #3.
What this PR does?:
When ZVOLs are provisioned, the driver checks to ensure that the device appears in the /dev file tree. In some environments, specifically, kind clusters running inside of a Docker container, this does not happen, resulting in situations when PVCs are provisioned but cannot be mounted to containers. This PR adds logic to ensure that the device nodes are created every time the ZVOL is provisioned, and removed when ZVOLs are removed.
Does this PR require any upgrade changes?:
No.
If the changes in this PR are manually verified, list down the scenarios covered::
Verified PVC with ext4 file system is correctly provisioned and mounted to the container: the PR logic correctly creates the missing device node in /dev.
When the container and PVC is removed, and StorageClass is configured with ReclaimPolicy: Delete, the ZVOL is correctly removed, along with the created device node.
When the container and PVC is recreated, the ZVOL device is provisioned again, and the device node is created again.
When the StorageClass is configured with ReclaimPolicy: Retain, the device nodes are created when PVC is provisioned, but not removed when it is removed.
Why is this PR required? What issue does it fix?: This resolves the issue listed in #3.
What this PR does?: When ZVOLs are provisioned, the driver checks to ensure that the device appears in the /dev file tree. In some environments, specifically,
kind
clusters running inside of a Docker container, this does not happen, resulting in situations when PVCs are provisioned but cannot be mounted to containers. This PR adds logic to ensure that the device nodes are created every time the ZVOL is provisioned, and removed when ZVOLs are removed.Does this PR require any upgrade changes?: No.
If the changes in this PR are manually verified, list down the scenarios covered::