Bug 1936771

Summary: [aws ebs csi driver] The event for Pod consuming a readonly PVC is not clear
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: StorageAssignee: Fabio Bertinatto <fbertina>
Storage sub component: Operators QA Contact: Qin Ping <piqin>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: aos-bugs, jsafrane
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:51:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qin Ping 2021-03-09 06:07:34 UTC
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:

Comment 1 Fabio Bertinatto 2021-03-19 12:37:24 UTC
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

Comment 2 Fabio Bertinatto 2021-04-20 12:17:21 UTC
This should be now fixed by the rebase done at https://github.com/openshift/aws-ebs-csi-driver/pull/183.

Comment 4 Qin Ping 2021-04-21 01:27:48 UTC
Verified with: 4.8.0-fc.0

Comment 7 errata-xmlrpc 2021-07-27 22:51:42 UTC
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