Bug 2033518 - [aws-efs-csi-driver]Should not accept invalid FSType in sc for AWS EFS driver
Summary: [aws-efs-csi-driver]Should not accept invalid FSType in sc for AWS EFS driver
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.10
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: 4.10.0
Assignee: Roman Bednář
QA Contact: Rohit Patil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-17 05:24 UTC by Rohit Patil
Modified: 2022-03-10 16:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:34:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift aws-efs-csi-driver pull 13 0 None open Bug 2033518: UPSTREAM: 612: Should not display FSType in describe pv for AWS EFS driver 2022-01-25 13:08:28 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:34:51 UTC

Comment 3 Wei Duan 2021-12-20 03:56:43 UTC
@Jan, yes I agree the root cause is the CSI Driver doesn't respect the fsType, every fsType will be propagate to pv info even using a invaild value like "aaaa", and the fix should be reject such provisioning.
On the other hand, EFS actually don't support the XFS or EXT3/4, so FSType: "" also stands for the same meaning here? Is it possible to disable it to avoid the confusing?

Comment 4 Jan Safranek 2021-12-20 13:53:49 UTC
I think that FSType: "" is OK to show that it's not known / default. For block volume based volumes it's useful to show if it's ext4 or XFS (if Kubernetes knows it), because it may behave differently, but for EFS there is no such choice, it's always NFS.

Comment 8 Rohit Patil 2022-01-28 15:20:34 UTC
Verified. 
Status: PASS

Release Version: 4.10.0-0.nightly-2022-01-27-221656
EFS Version: 4.10.0-202201261535

Tests:
1) With fstype: efs: pod running fine. 
rohitpatil@ropatil-mac dynamicprovi_done % oc describe pv pvc-952c5342-13e1-48e8-9fa2-6c58c1c8993c -n testefs
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            efs.csi.aws.com
    FSType:            efs
    VolumeHandle:      fs-041b39066187fbf36::fsap-0011da27dc6d91cc9


2) With nonfstype parameter: pod running fine.
rohitpatil@ropatil-mac dynamicprovi_done % oc describe pv  pvc-873afa64-066d-4e9f-8df0-08b1320d1a07 -n testefs
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            efs.csi.aws.com
    FSType:            
    VolumeHandle:      fs-041b39066187fbf36::fsap-05699bded0750b1cc


3) With any other fstypes parameter: pod/pvc will be in pending state with error message:
rohitpatil@ropatil-mac dynamicprovi_done % oc describe pvc efs-claim -n testefs
Events:
  Type     Reason                Age               From                                                                 Message
  ----     ------                ----              ----                                                                 -------
  Normal   Provisioning          3s (x6 over 34s)  efs.csi.aws.com_ip-10-0-79-158_6489a227-f449-47b5-9b31-1e8f0ab81f92  External provisioner is provisioning volume for claim "testefs/efs-claim"
  Warning  ProvisioningFailed    3s (x6 over 34s)  efs.csi.aws.com_ip-10-0-79-158_6489a227-f449-47b5-9b31-1e8f0ab81f92  failed to provision volume with StorageClass "efs-sc": rpc error: code = InvalidArgument desc = Volume capabilities not supported: invalid fstype: nfs

Comment 11 errata-xmlrpc 2022-03-10 16:34:34 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.10.3 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-2022:0056


Note You need to log in before you can comment on or make changes to this bug.