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 1232074

Summary: autofs is performing excessive direct mount map re-reads
Product: Red Hat Enterprise Linux 6 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: xiaoli feng <xifeng>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: eguan, ikent, madgupta, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.0.5-119.el6 Doc Type: Bug Fix
Doc Text:
Cause: When re-reading a direct mount map the stale map flag was not being correctly re-reset. Consequence: A direct map re-read is triggered on each map lookup. Fix: Correctly reset the map stale flag in all the places that need it. Result: Direct map re-reads are only done when request by a service reload.
Story Points: ---
Clone Of:
: 1233067 (view as bug list) Environment:
Last Closed: 2016-05-11 00:50:31 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: 1233067, 1268411    
Attachments:
Description Flags
Patch - fix direct mount stale instance flag reset none

Description Ian Kent 2015-06-16 02:41:17 UTC
Description of problem:
When re-reading a direct map the stale map instance flag is not being
reset. This causes the map to be seen as stale on subsequent lookups
thereby triggering a map re-read.


Version-Release number of selected component (if applicable):
autofs.x86_64 1:5.0.5-109.el6

This problem was seen when working on bug 1227496 so a subset
of the steps to reproduce the bug of 1227496 can be used to
reproduce it.

Steps to Reproduce:
1. Set autofs to produce debug log output to syslog.

# grep debug /etc/autofs.conf
# logging - set default log level "none", "verbose" or "debug"
logging = debug

and ensure rsyslog is logging facility daemon output

# grep daemon /etc/rsyslog.conf
daemon.*		/var/log/debug

2. Add a direct mount map to auto.master.

# grep direct /etc/auto.master
/- /etc/auto.direct

3. Add a couple of entries to the direct mount map but leave
   them commented out.
# cat /etc/auto.direct 
#/test/s1	bilbo:/Public
#/test/s2	bilbo:/autofs

4. Start the autofs service

# service autofs start

4. Modify /etc/auto.direct and uncomment the entries

# cat /etc/auto.direct 
/test/s1	bilbo:/Public
/test/s2	bilbo:/autofs

5. Reload the autofs maps

# service autofs reload

6. Access one of the direct mount map entries causing it
   to be mounted.

# ls /test/s1

7. Observe that in autofs debug logging shows a map re-read has
   been triggered after the lookup even though the maps has just
   been re-read by the re-load in step 4.
 
Actual results:
autofs re-reads the direct map on every mount lookup.

Expected results:
autofs doesn't re-read the direct map on lookup, only on re-load
requests.

Comment 1 Ian Kent 2015-06-16 02:47:05 UTC
Created attachment 1039242 [details]
Patch - fix direct mount stale instance flag reset

Patch is against upstream, needs back porting.

Comment 6 errata-xmlrpc 2016-05-11 00:50:31 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, 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://rhn.redhat.com/errata/RHBA-2016-0934.html