Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2208408

Summary: autofs fails to start with combination of +auto.master and local direct map lookups after upgrading to 5.1.4-93.el8
Product: Red Hat Enterprise Linux 8 Reporter: Ju Ke <jke>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Kun Wang <kunwan>
Severity: medium Docs Contact:
Priority: high    
Version: 8.8CC: anderson, byodlows, dwysocha, fsorenso, ikent, jpetrini, rakkumar, R.Eggermont, tc.staff, wart, xzhou
Target Milestone: rcKeywords: CustomerScenariosInitiative, Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.1.4-104.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2210161 2212588 (view as bug list) Environment:
Last Closed: 2023-11-14 15:48:36 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:
Bug Depends On:    
Bug Blocks: 2210161, 2212588    

Description Ju Ke 2023-05-18 23:55:05 UTC
Description of problem:

autofs is configured with the combination of +auto.master and the local direct map lookups.
It works well at autofs-5.1.4-83.el8.x86_64. 
After upgrading to autofs-5.1.4-93.el8.x86_64, autofs fails to start.


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

RHEL 8.8
kernel-4.18.0-477.10.1.el8_8.x86_64
autofs-5.1.4-93.el8.x86_64

How reproducible:


Steps to Reproduce:

There are 3 scenarios:

(1) scenario-1

#### Configuration 1: Direct maps in network +auto.master map plus direct map specified in /etc/auto.master
“+auto.master maps contain a /- direct map” and “/etc/auto.master also has a /- direct map from a local file”
No clashing paths in the direct maps.

/etc/auto.master contains:
/homes  /etc/auto.lhome   # Script that provides mount path
+auto.master
/- /etc/auto.direct

/etc/auto.scis-utils contains:
/usr/scis-utils     -vers=3,ro      scis-nfs:/export/scis/readonly/scis-utils

(2) scenario-2
#### Configuration 2: Direct and Indirect maps with duplicate root paths in +auto.master and /etc/auto.master
+auto.master maps have entries where direct and indirect map paths clash with other direct and indirect maps specified in local maps.
EG:
+auto.master map contain:
/-    with list of many direct map NFS mount paths, including “/usr/scis-utils     -vers=3,ro      scis-nfs:/export/scis/readonly/scis-utils”
/home    with list of many NFS mount paths

/etc/auto.master contains:
/home   /etc/auto.lhome   # Script that provides mount path
+auto.master
/- /etc/auto.scis-utils

/etc/auto.scis-utils contains:
/usr/scis-utils     -vers=3,ro      scis-nfs:/export/scis/readonly/scis-utils

Clashes:
/home root of an indirect map is in both the +auto.master map and listed in /etc/auto.master
/usr/scis-utils path of a direct map is in both the +auto.master /- direct map, and the /etc/auto.scis-utils direct map.

(3)scenario-3

#### Configuration 3: Two sources for the /home indirect map. First entry in /etc/auto.master should apply.
+auto.master maps have entries where indirect map paths clash with other indirect maps specified in local maps.
+auto.master map contain:
/-    with list of many direct map NFS mount paths, including “/usr/scis-utils     -vers=3,ro      scis-nfs:/export/scis/readonly/scis-utils”
/home    with list of many NFS mount paths

/etc/auto.master contains:
/home   /etc/auto.lhome   # Script that provides mount path
+auto.master

(4) Analysis:
The first two scenarios (combinations of multiple direct maps) are triggering an automount seg fault on boot, or when doing a “systemctl reload autofs” or “systemctl restart autofs”.

The third scenario (configuration of overlaid/duplicate indirect maps for /home) works on boot, but fails if a reload or restart is performed after initial boot.

Correct operation should allow multiple sources for direct maps. 
Correct operation should allow multiple sources for indirect maps, with a ‘first specified’ hierarchy defining the map source in use.
Customer have been operating in this mode for many years. Previous automount versions supported this happily on RHEL, CentOS and Ubuntu systems.

Actual results:
autofs fails to start by causing core dump.

Expected results:
autofs should start as expected.

Additional info:

Impact: Enterprise wide outage effecting all RHEL 8 users (800 systems)
Classified systems so no sosreport or remote access available.
Customer is unable to provide a core dump due to the classified nature of these systems.

Comment 11 Ian Kent 2023-05-24 01:18:41 UTC
(In reply to Ian Kent from comment #10)
> (In reply to Ju Ke from comment #9)
> > Hi Ian
> > 
> > Thanks for your great help. RPM 'autofs-5.1.4-104.el8.x86_64' fixes all
> > issues of three scenarios. The customer's comments are below:
> > 
> > ~~~
> > I can confirm that this version of autofs works in all of the above
> > scenarios.
> > I assume this means this version will be released into the RHEL streams. Do
> > you have any time scales on that?
> > ~~~
> 
> The build I provided was to check if the change would fix the problem (a so
> called scratch build).
> The revision may change when the change gets released.
> 
> > 
> > If possible, please kindly let us know the time line when
> > 'autofs-5.1.4-104.el8.x86_64.rpm' can be released.

Normally fixes are included the next release, in this case RHEL-8.9, as
can be seen from the bug flags now.

You may follow the support accelerated fix procedure if you think the
customer case warrants it.

Regardless of whether you seek an accelerated fix it must be resolved
in the current release to prevent regressions.

Ian

Comment 31 Stuart Anderson 2023-06-19 15:55:55 UTC
(In reply to Ian Kent from comment #11)
> 
> Normally fixes are included the next release, in this case RHEL-8.9, as
> can be seen from the bug flags now.
> 
> You may follow the support accelerated fix procedure if you think the
> customer case warrants it.
> 
> Regardless of whether you seek an accelerated fix it must be resolved
> in the current release to prevent regressions.

+1 for fixing this regression in RHEL-8.8.

Thanks.

Comment 34 Ian Kent 2023-06-26 08:24:57 UTC
*** Bug 2216540 has been marked as a duplicate of this bug. ***

Comment 38 James Petrini 2023-07-04 14:01:47 UTC
my customer in Case 03534352 requested the offered hot fix for rhel 8.8  ( offered in notes in now closed duplicate BZ 2216540 )

Comment 42 errata-xmlrpc 2023-11-14 15:48:36 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 (autofs 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:7098