Description of problem: The event for Pod consuming a readonly PVC is not clear Version-Release number of selected component (if applicable): 4.8.0-0.nightly-2021-03-06-055252 How reproducible: Always Steps to Reproduce: 1. Create a storageclass with: $ cat sc-mountoptions.yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: ebs-sc provisioner: ebs.csi.aws.com parameters: csi.storage.k8s.io/fstype: xfs volumeBindingMode: WaitForFirstConsumer mountOptions: - ro 2. Create a PVC with this SC 3. Create a Pod consuming this PVC Actual results: Pod is not running and reports events: Warning FailedMount <invalid> (x5 over <invalid>) kubelet MountVolume.MountDevice failed for volume "pvc-a3ff0dc5-ae56-4215-8689-a09ca9354f35" : rpc error: code = Internal desc = could not format "/dev/nvme1n1" and mount it at "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-a3ff0dc5-ae56-4215-8689-a09ca9354f35/globalmount" For the in-tree plugin the event is clearer: Warning FailedMount 50s (x10 over 5m9s) kubelet MountVolume.MountDevice failed for volume "pvc-41ff9ef1-1d9d-4c1d-8e7d-e0a5d1bd0816" : cannot mount unformatted disk /dev/nvme1n1 as we are manipulating it in read-only mode Expected results: Report clear events like in-tree plugin. Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info:
This has been improved in upstream, but at the moment there's no tag that covers the patch [1], so we have to wait before rebasing. [1] github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/786/files
This should be now fixed by the rebase done at https://github.com/openshift/aws-ebs-csi-driver/pull/183.
Verified with: 4.8.0-fc.0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438