dell / csm

Dell Container Storage Modules (CSM)
Apache License 2.0
71 stars 15 forks source link

[BUG]: Unable to mount ReadOnlyMany PVC using CSI driver for PowerFlex #1565

Closed rishabhatdell closed 4 days ago

rishabhatdell commented 1 week ago

Bug Description

Unable to mount ReadOnlyMany PVC using CSI-PowerFlex

Error message

time="2024-10-21T09:51:06Z" level=info msg="mount command" args="-t ext4 -o ro /dev/scinib /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/2b6e15c75b2ff90f-7ed828f900000025" cmd=mount
time="2024-10-21T09:51:06Z" level=error msg="mount Failed" args="-t ext4 -o ro /dev/scinib /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/2b6e15c75b2ff90f-7ed828f900000025" cmd=mount error="exit status 32" output="mount: /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/2b6e15c75b2ff90f-7ed828f900000025: wrong fs type, bad option, bad superblock on /dev/scinib, missing codepage or helper program, or other error.\n"

Logs

time="2024-11-04T11:07:43Z" level=info msg="attempting mount to private area" CSIRequestID=31 device=/dev/scinia id=6689fba68522eb0f-7840b2f70000001f privateMount=/var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f target="/var/lib/kubelet/pods/1e913e9d-6a8b-495d-8337-130b59a76d97/volumes/kubernetes.io~csi/k8s-891444da0e/mount" volumePath=/dev/scinia
time="2024-11-04T11:07:43Z" level=warning msg="Unable to check stat of file: /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f with error: stat /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f: no such file or directory"
time="2024-11-04T11:07:43Z" level=debug msg="created directory" path=/var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f
time="2024-11-04T11:07:43Z" level=info msg="mount command" args="-t ext4 -o ro /dev/scinia /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f" cmd=mount
time="2024-11-04T11:07:43Z" level=error msg="mount Failed" args="-t ext4 -o ro /dev/scinia /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f" cmd=mount error="exit status 32" output="mount: /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f: wrong fs type, bad option, bad superblock on /dev/scinia, missing codepage or helper program, or other error.\n"
time="2024-11-04T11:07:43Z" level=info msg="Cleaning up private target" CSIRequestID=31 privTgt=/var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f
time="2024-11-04T11:07:43Z" level=info msg="/csi.v1.Node/NodePublishVolume: REP 0031: rpc error: code = Internal desc = error performing private mount: mount failed: exit status 32"
time="2024-11-04T11:07:43Z" level=info msg="mounting arguments: -t ext4 -o ro /dev/scinia /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f"
time="2024-11-04T11:07:43Z" level=info msg="output: mount: /var/lib/kubelet/plugins/vxflexos.emc.dell.com/disks/6689fba68522eb0f-7840b2f70000001f: wrong fs type, bad option, bad superblock on /dev/scinia, missing codepage or helper program, or other error."

Screenshots

No response

Additional Environment Information

No response

Steps to Reproduce

Expected Behavior

Volume should successfully mount to pod and pod should be running state

CSM Driver(s)

CSI-PowerFlex

Installation Type

Helm/Operator

Container Storage Modules Enabled

No response

Container Orchestrator

OCP/K8s

Operating System

RHEL

rishabhatdell commented 1 week ago

link: 29684

rishabhatdell commented 4 days ago

Closing this issue because its expected for driver not to mount an empty read-only volume because ReadOnlyMany is intended for volumes with pre-existing data. It only makes sense to read from a volume containing data, so creating an empty read-only volume would simply waste storage space.

shanmydell commented 4 days ago

Clearing milestone as this is expected behavior and no-change to the code