Red Hat Bugzilla – Bug 1233067
autofs is performing excessive direct mount map re-reads
Last modified: 2015-11-19 08:01:02 EST
+++ This bug was initially created as a clone of Bug #1232074 +++ 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. --- Additional comment from Ian Kent on 2015-06-15 22:47:05 EDT --- Patch is against upstream, needs back porting.
Created attachment 1042095 [details] Patch - fix direct mount stale instance flag reset
run test case /autofs/sanity/reload for autofs-5.0.7-53.el7, seems good. autofs previous version: :: [ BEGIN ] :: Running 'tests/readmap.sh' posix on Redirecting to /bin/systemctl stop autofs.service Redirecting to /bin/systemctl restart autofs.service Redirecting to /bin/systemctl reload autofs.service :: [ BEGIN ] :: Running 'check_dir /direct/plus' :: [ PASS ] :: Command 'check_dir /direct/plus' (Expected 0, got 0) :: [ BEGIN ] :: Running 'check_dir /direct/plus2' :: [ FAIL ] :: Command 'check_dir /direct/plus2' (Expected 1, got 0) Redirecting to /bin/systemctl stop autofs.service :: [ PASS ] :: Command 'tests/readmap.sh' (Expected 0, got 0) autofs-5.0.7-53.el7: [04:22:32 root@ ~~]# tests/readmap.sh posix on Redirecting to /bin/systemctl stop autofs.service Redirecting to /bin/systemctl restart autofs.service Redirecting to /bin/systemctl reload autofs.service :: [ BEGIN ] :: Running 'check_dir /direct/plus' :: [ PASS ] :: Command 'check_dir /direct/plus' (Expected 0, got 0) :: [ BEGIN ] :: Running 'check_dir /direct/plus2' :: [ PASS ] :: Command 'check_dir /direct/plus2' (Expected 1, got 1) Redirecting to /bin/systemctl stop autofs.service also run regression, connectathon, stress, bugzillas test cases for autofs-5.0.7-53.el7, covers x86_64, s390x, ppc64, ppc64le, no new issues. so I will change this bug status to be verified.
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/RHSA-2015-2417.html