Bug 242230

Summary: first lookup against wildcard map entry consistently fails
Product: [Fedora] Fedora Reporter: Jeff Layton <jlayton>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7CC: andrew, ikent, jmoyer, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.1-11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-18 16:41:05 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:

Description Jeff Layton 2007-06-02 12:30:22 UTC
The first attempt to do a lookup of an entry against a wildcard entry always
seems to fail. For instance:

# touch /home/jlayton/foo
touch: cannot touch `/home/jlayton/foo': No such file or directory

Every subsequent lookup of this entry will work until autofs is restarted. The
first one always seems to fail.

First, some info:

autofs-5.0.1-9
kernel 2.6.21-1.3194.fc7 (i686 "normal")

auto.master:
/misc   /etc/auto.misc
/net    -hosts
/home   /etc/auto.home --debug

auto.home:
*       -rsize=32768,wsize=32768,noatime                server:/export/home/&

automount entry from nsswitch.conf:

automount:  files

...excerpt from daemon.debug log during autologin attempt with a home directory
mounted via this wildcard entry:

Jun  2 07:35:28 tleilax automount[2030]: handle_packet: type = 3
Jun  2 07:35:28 tleilax automount[2030]: handle_packet_missing_indirect: token
1, name jlayton, request pid 2651
Jun  2 07:35:28 tleilax automount[2030]: lookup_mount: lookup(file): looking up
jlayton
Jun  2 07:35:28 tleilax automount[2030]: lookup_mount: lookup(file): check
indirect map lookup failed
Jun  2 07:35:28 tleilax gdm[2651]: gdm_slave_session_start: Home directory for
jlayton: '/home/jlayton' does not exist!

If I change the auto.home map to have an explicit entry for 'jlayton' then the
first lookup always works. So this seems to be dependent upon wildcard entries.

Comment 1 Ian Kent 2007-06-03 05:12:03 UTC
Mmm .. I didn't see this in testing.

Comment 2 Ian Kent 2007-06-03 16:07:19 UTC
(In reply to comment #0)
> Jun  2 07:35:28 tleilax automount[2030]: lookup_mount: lookup(file): check
> indirect map lookup failed

Found it.
Simple programming error.
Have updated devel and F-7.
An update has been submitted for F7, autofs-5.0.1-11.
Can you check it when you get a chance please.

Ian


Comment 3 Jeff Layton 2007-06-03 16:47:03 UTC
That fixed it. Thanks!

Comment 4 Fedora Update System 2007-06-04 04:13:37 UTC
autofs-5.0.1-11 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Andrew Clayton 2007-06-06 10:44:39 UTC
*** Bug 242464 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2007-06-18 16:41:02 UTC
autofs-5.0.1-11 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.