RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2142002 - [RFE] Filesystem: Support for Amazon Elastic File System (EFS) (RHEL9)
Summary: [RFE] Filesystem: Support for Amazon Elastic File System (EFS) (RHEL9)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: resource-agents
Version: 9.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 9.2
Assignee: Oyvind Albrigtsen
QA Contact: Brandon Perkins
Steven J. Levine
URL:
Whiteboard:
Depends On: 2049319
Blocks: 2183133
TreeView+ depends on / blocked
 
Reported: 2022-11-11 11:35 UTC by Oyvind Albrigtsen
Modified: 2024-04-22 18:36 UTC (History)
11 users (show)

Fixed In Version: resource-agents-4.10.0-37.el9
Doc Type: Enhancement
Doc Text:
.The `Filesystem` resource agent now supports the EFS file system type The `ocf:heartbeat:Filesystem` cluster resource agent now supports the Amazon Elastic File System (EFS). You can now specify `fstype=efs` when configuring a `Filesystem` resource.
Clone Of: 2049319
Environment:
Last Closed: 2023-11-07 08:23:10 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6246 0 None None None 2022-12-01 17:20:39 UTC
Red Hat Issue Tracker RHELPLAN-139161 0 None None None 2022-11-11 11:46:37 UTC
Red Hat Knowledge Base (Solution) 5469181 0 None None None 2023-11-08 16:09:16 UTC
Red Hat Product Errata RHBA-2023:6312 0 None None None 2023-11-07 08:23:54 UTC

Description Oyvind Albrigtsen 2022-11-11 11:35:08 UTC
+++ This bug was initially created as a clone of Bug #2049319 +++

Description of problem:

This is an RFE to add support for fstype=efs to the ocf:heartbeat:Filesystem resource agent.

The RA fails with OCF_ERR_INSTALLED if the fstype_supported() function returns failure. fstype_supported() succeeds only if one of the following two conditions are met:
  - the fstype is already in /proc/filesystems
  - we find and load a kernel module called $FSTYPE and then it appears in /proc/filesystems

/proc/filesystems is normally a great way to check for supported filesystems, but it doesn't work for EFS. (Rather, it doesn't *fully* work. See note [1].)

Amazon provides a repo from which you can build package called amazon-efs-utils [2]. amazon-efs-utils provides the EFS mount helper (`mount.efs`). The EFS mount helper provides AWS-specific mount options like iam, accesspoint, awsprofile, etc. It also allows the user to configure added security [3]:

    When encryption of data in transit is declared as a mount option for your Amazon 
    EFS file system, the mount helper initializes a client stunnel process, and a 
    supervisor process called amazon-efs-mount-watchdog. ...
    
    Stunnel is an open-source multipurpose network relay. The client stunnel process 
    listens on a local port for inbound traffic, and the mount helper redirects NFS 
    client traffic to this local port.
    
    The mount helper uses TLS version 1.2 to communicate with your file system. 
    Using TLS requires certificates, and these certificates are signed by a trusted 
    Amazon Certificate Authority.

mount.efs is actually a wrapper for /sbin/mount.nfs4. When a user runs `mount -t efs` or `mount.efs`, it processes all of the extras that I alluded to above and then mounts the filesystem as nfs4. When you check /proc/mounts afterward, the FS looks like an NFS filesystem except for the server name.

This request is for the Filesystem resource agent to support fstype=efs so that users can take advantage of these extra features. We basically need to treat it as nfs4 except when we run the mount command during startup -- we should use `mount -t efs` rather than `mount -t nfs4`.


[1] An EFS filesystem can be mounted with fstype "nfs", which should work with the Filesystem resource agent but which doesn't provide the added features of the EFS mount helper.
[2] Manually installing the Amazon EFS client (https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html)
[3] Mounting file systems using the EFS mount helper (https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html)


EDIT: The fstype_supported() function is actually broken, and it has been since it was created 8 years ago. It returns success no matter what unless the OS is OpenBSD (the opposite of what it should do). The REAL reason for failure with fstype=efs is that it's treated as a non-cluster-safe filesystem whose device is a block device. I knew that would need to be fixed, but I assumed the fstype_supported() function would be the first issue.

-----

Version-Release number of selected component (if applicable):

resource-agents-4.1.1-98.el8_5.2

-----

How reproducible:

Always

-----

Steps to Reproduce:
1. Create an ocf:heartbeat:Filesystem resource with fstype=efs.

-----

Actual results:

"not installed" error at startup

-----

Expected results:

Filesystem resource starts and runs fine.

-----

Additional info:

We would want a z-stream for at least RHEL 8.4, for SAP support. If it's not too much trouble, it would be nice to get 8.1.z and 8.2.z for the same reason.

I hope RHEL 7 isn't necessary. People shouldn't be building new clusters on RHEL 7 at all, let alone clusters that require specific features that we've never supported.

https://github.com/ClusterLabs/resource-agents/commit/e2174244067b02d798e0f12437f0f499c80f91fe

Comment 18 errata-xmlrpc 2023-11-07 08:23:10 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 (resource-agents bug fix and enhancement 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/RHBA-2023:6312


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