Bug 703332

Summary: autofs fails to find duplicate key after key removal
Product: Red Hat Enterprise Linux 6 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: ikent, kzhang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.0.5-32 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 732333 (view as bug list) Environment:
Last Closed: 2011-12-06 17:58:40 UTC Type: ---
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: 732333    
Attachments:
Description Flags
Patch - fix map source check in file lookup
none
Patch - fix map source check in file lookup (updated)
none
Patch - fix prune cache valid check
none
Patch - fix map source check in file lookup (updated 2) none

Description Ian Kent 2011-05-10 02:41:25 UTC
Description of problem:

With an automount that has a key present in a file map and the same
key also present in an included map source, if the file map entry is
removed and a lookup is performed before a re-load is issued the
map lookup fails.

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

How reproducible:
Always.

Steps to Reproduce:
1. Create a file map, /etc/auto.includetest containing:
foo	localhost:/export/foo
+auto.test2

Create /etc/auto.test2 containing:
foo	<server>:/export/foo

Add an entry to the master map:
/includedtest		file:/etc/auto.includedtest


2. Perform a lookup on map key foo using "ls /includedtest/foo"
and wait for it to expire.

3. Remove map key from map /etc/auto.includetest and repeat
the lookup of step 2.
  
Actual results:
The lookup in step 3 fails to find the key in map
/etc/auto.test2.

Expected results:
The lookup in step 3 fails to find the key in map
/etc/auto.test2.

Comment 2 Ian Kent 2011-05-10 04:05:55 UTC
Created attachment 497950 [details]
Patch - fix map source check in file lookup

Comment 3 Ian Kent 2011-05-18 03:41:28 UTC
Created attachment 499512 [details]
Patch - fix map source check in file lookup (updated)

Comment 4 Ian Kent 2011-05-18 03:42:18 UTC
Created attachment 499513 [details]
Patch - fix prune cache valid check

Comment 5 Ian Kent 2011-05-18 08:11:24 UTC
Created attachment 499539 [details]
Patch - fix map source check in file lookup (updated 2)

So, the original patch is actually needed although I'm
not completely convinced this won't have unexpected and
difficult to resolve side effects. But with so many
regression tests now I might be mistaken.

Comment 7 yanfu,wang 2011-08-25 06:07:09 UTC
bz248152 passed when run autofs regression testing, job links pls refer to below:
i386: https://beaker.engineering.redhat.com/jobs/123937
x86_64: https://beaker.engineering.redhat.com/jobs/123442
s390x: https://beaker.engineering.redhat.com/jobs/123318
ppc64: https://beaker.engineering.redhat.com/jobs/123317

Comment 8 errata-xmlrpc 2011-12-06 17:58:40 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.

http://rhn.redhat.com/errata/RHBA-2011-1723.html