Bug 2207801

Summary: amd map format netgoup selector function not working
Product: Red Hat Enterprise Linux 8 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Kun Wang <kunwan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.7CC: dwysocha, fhirtz, fsorenso, jwesterd, kunwan, xzhou
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.1.4-105.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2210899 (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: 2210899    

Description Ian Kent 2023-05-16 23:40:33 UTC
Description of problem:

Jonathan from Morgan has been continuing testing with the RHEL8 autofs, and the earlier issues with the hangs and the like are gone (Thanks again for that). He did have a pair of questions around netgrp handling and selectors if you have a moment:

<customer email>

We have hit another snag with the AMD compatibility layer in AutoFS. Can you kindly reach out to Ian and find out if the netgrpd() functionality was ported in to AutoFS AMD compatibility layer?

We have several escalations of mount failures due to the following:

May  2 17:16:18 [REDACTED HOSTNAME] automount[2410]: parse_mount: parse(amd): failed to parse entry: netgrpd(aveksa_hosts_all_nonprod);addopts:=sec=sys;rhost:=[REDACTED];rfs:=[REDACTED] || addopts:=sec=krb5,vers=4;rhost:=[REDACTED];rfs:=[REDACTED]

There are a little over 3000 shares in the plant relying on the netgrpd() functionality so this is causing some pain.

The netgrpd() functionality AND selectors (‘||’). The time we use selectors is when we have a group of hosts that needs to mount the share with a different security_flavor than the default.

Version-Release number of selected component (if applicable):
autofs-5.1.4-103.el8

How reproducible:
Always

Steps to Reproduce:
1.
1a) add "/test	file,amd:/etc/amd.test" to /etc/auto.master.
1b) create /etc/amd.test as
mnt1    netgrpd(mynetgroupd);type:=nfs;rhost:=centos7;rfs:=/autofs/export1 || type:=nfs;rhost:=centos7;rfs:=/autofs/export2
mnt2    netgrpd(othernetgroupd);type:=nfs;rhost:=centos7;rfs:=/autofs/export1 netgrpd(mynetgroupd);type:=nfs;rhost:=centos7;rfs:=/autofs/export2

2. Create /etc/netgroup as
mynetgroup	(donald,,themaw.net)(gandalf,,themaw.net)
mynetgroupd	(donald.themaw.net,,themaw.net)(gandalf.themaw.net,,themaw.net)

3. Start autofs, ensure /test gets mounted and try "ls /test/mnt1" or
   "ls /test/mnt2"
4. Observe the "failed to parse entry" entry in the systemd journal.

This assumes an NFS server named centos7.themaw.net that has exported
directories of /autofs/export1 and /autofs/export2, and an autofs
client named donald.themaw.net setup as above.

Actual results:
The mount fails with a parse error.

Expected results:
No parse error is seen and the appropriate mount is attempted,
either for a netgroup name match orthe one corresponding to not
a match.

Comment 3 Ian Kent 2023-05-17 00:09:03 UTC
Resolving these recently discovered bugs with the autofs amd map format
support is important to providing an alternative to the am-utils package
that's not available in RHEL.

With resolving this problem I hope there won't be further show stopper
problems so that this is the last important, time critical fix that we
need to provide.

Since this is an important fix I'm recommending we cancel the hot fix
we were going to provide from bug 2175017/2192275 and use the package
from this bug.

Is this ok, FrankH, FrankS, DaveW?

Ian

Comment 4 Ian Kent 2023-05-17 00:11:39 UTC
There were a few other problems mentioned in an initial email, once
we've sorted this problem out I'd like to review what we still have
to do and the priorities.

Comment 14 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