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 2184779 - Filesystem: create systemd unit files for filesystems that are considered network filesystems by systemd
Summary: Filesystem: create systemd unit files for filesystems that are considered net...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: resource-agents
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 9.3
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-05 17:34 UTC by Shane Bradley
Modified: 2023-11-07 08:59 UTC (History)
6 users (show)

Fixed In Version: resource-agents-4.10.0-38.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:23:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6704 0 None None None 2023-05-17 11:14:38 UTC
Red Hat Issue Tracker RHELPLAN-154113 0 None None None 2023-04-05 17:37:39 UTC
Red Hat Knowledge Base (Solution) 3259321 0 None None None 2023-04-05 17:34:02 UTC
Red Hat Product Errata RHBA-2023:6312 0 None None None 2023-11-07 08:23:54 UTC

Description Shane Bradley 2023-04-05 17:34:02 UTC
Description of problem:

A customer was seeing his gfs2 filesystem managed by pacemaker shutting down before pacemaker started the shutdown process when doing a "shutdown -h now". This should not occur if the filesystem is managed by pacemaker. 

We should create systemd unit files for filesystems that are considered network filesystems by systemd for our `Filesystem` resource-agent. 

Any filesystem that is supported by the `Filesystem` resource-agent that is considered a `network` filesystem by systemd [1] should be include a unit file system to make sure that those filesystem are not shutdown before pacemaker. 


Version-Release number of selected component (if applicable):
resource-agents-4.9.0-16.el8.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Configure a gfs2 filesystem that is managed by pacemaker.
2. Do: shutdown -h now

Actual results:
The gfs2 filesystems managed by pacemaker are shutdown before pacemaker starts the shutdown process.

Expected results:
The gfs2 filesystem should NOT be shutdown by systemd and unmounted. They should only be unmounted when pacemaker begins
its shutdown.

Additional info:

We should add a check on Filesystem type for the 'Filesystem' resource-agent then create a unit file similar to what we do with "LVM-activate" resource. We should do this for any type that "Filesystem" resource-agent supports and which is considered a network filesystem by systemd. 

Create the following file:
  # touch /etc/systemd/system/resource-agents-deps.target.d/gfs2.conf

Then add the following to the file /etc/systemd/system/resource-agents-deps.target.d/gfs2.conf:
  [Unit]
  After=remote-fs.target

Then reload systemd
  # systemctl daemon-reload

Comment 1 Reid Wahl 2023-04-05 17:41:11 UTC
The systemd_drop_in() function can do this. See lvm_start() in LVM-activate.

This would be something like
```
            # if this is a remote filesystem (https://github.com/systemd/systemd/blob/v253/src/basic/filesystems.c#L115-L132)
            systemd_drop_in "99-Filesystem-remote" "After" \
                    "remote-fs.target"
```

We should think about whether Wants= or Requires= is also necessary. I think After= is sufficient.

Comment 2 Oyvind Albrigtsen 2023-05-17 10:35:07 UTC
https://github.com/ClusterLabs/resource-agents/pull/1869

Comment 10 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.