Bug 435960 - autofs with map file auto.nis not working, error: automount master_error: syntax error while parsing map
Summary: autofs with map file auto.nis not working, error: automount master_error: syn...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs
Version: 5.1
Hardware: i386
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-04 17:21 UTC by matus
Modified: 2009-01-20 21:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:45:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to prevent tokenizer getting confused with map type in map name (1.02 KB, patch)
2008-03-06 04:00 UTC, Ian Kent
no flags Details | Diff
Correction for the map type in map name patch (959 bytes, patch)
2008-03-06 04:06 UTC, Ian Kent
no flags Details | Diff
And another correction (997 bytes, patch)
2008-03-06 04:12 UTC, Ian Kent
no flags Details | Diff
Patch to prevent tokenizer getting confused with map type in map name (1.62 KB, patch)
2008-03-30 03:52 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0178 0 normal SHIPPED_LIVE autofs bug fix update 2009-01-20 16:05:44 UTC

Description matus 2008-03-04 17:21:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080208 Fedora/2.0.0.12-1.fc8 Firefox/2.0.0.12

Description of problem:
I have clean installation of Rhel 5.1 tor testing, I have setup autofs to mount home folders for nisusers. When I name my map file auto.nis (as I used to do in Rhel 5) I'm getting error in /var/log/messages "automount[3141]: master_error: syntax error while parsing map" when i restart autofs service.
After changing name of map file to anything else (auto.home, auto.guests, auto.direct, auto.agob, auto.fazula, ... I have tried coule of them) It is working, except auto.nis
After changing back to auto.nis it stop working agin.
And of course I restarted autofs service after changing configs.
For testing purposes firewalls and selinux is off on server and clients.

It is not big deal but i have spend 3days to figure out that this is the problem, I didn't expect this to be a issue as it was working in Rhel5.
Please can you reproduce and confirm that it actually is a BUG? I will appreciate it. Thanks

My /etc/auto.master contain:
/misc   /etc/auto.misc
/net    -hosts
/nishome        /etc/auto.home --timeout 60
+auto.master

/etc/auto.nis contain:
*       -rw,soft,intr   192.168.122.1:/nishome/&

I have copied other map files with different names from auto.nis so they are exactly the same.

#ls -la /etc/auto.*

-rw-r--r-- 1 root root   42 Mar  3 10:32 /etc/auto.agob
-rw-r--r-- 1 root root  112 Feb 29 18:47 /etc/auto.direct
-rw-r--r-- 1 root root   42 Mar  3 10:37 /etc/auto.fazula
-rw-r--r-- 1 root root   42 Mar  3 10:29 /etc/auto.guests
-rw-r--r-- 1 root root   42 Mar  4 17:35 /etc/auto.home
-rw-r--r-- 1 root root   83 Mar  4 17:46 /etc/auto.master
-rw-r--r-- 1 root root  581 Sep 25 16:20 /etc/auto.misc
-rwxr-xr-x 1 root root 1292 Sep 25 16:20 /etc/auto.net
-rw-r--r-- 1 root root   42 Feb 29 18:17 /etc/auto.nis
-rwxr-xr-x 1 root root  715 Sep 25 16:20 /etc/auto.smb





Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.55

How reproducible:
Always


Steps to Reproduce:
1. change name of the map file to auto.nis
2. restart autofs service
3. 

Actual Results:
when logging in wwith nisuser, home folder is not mounted 

Expected Results:
mount the folders when nisuser log in

Additional info:
client is Rhel 5.1 installed from DVD with ho updates,
error message in /var/log/messages is: automount[3141]: master_error: syntax error while parsing map

/etc/auto.master contain:
/misc   /etc/auto.misc
/net    -hosts
/nishome        /etc/auto.home --timeout 60
+auto.master

/etc/auto.nis contain:
*       -rw,soft,intr   192.168.122.1:/nishome/&

Comment 1 Jeff Moyer 2008-03-04 17:34:34 UTC
Your master map doesn't reference auto.nis at all, so I cannot follow your
problem description.  I tried to reproduce this locally (replacing the /nishome
/etc/auto.home with the map /etc/auto.nis), but without success.

Note that you should apply all available kernel updates, as the 5.1 kernel has a
bug with autofs that keeps it from mounting on first access.

After you've updated your kernel, please collect debugging information as
outlined on the following web pages:
  http://people.redhat.com/jmoyer/

Thanks.

Comment 2 matus 2008-03-04 18:35:29 UTC
hi sorry,

I copied the auto.master after i have edited and tried with auto.home which worked.

Please tried it this way

it should be 

/etc/auto.master contain:
/misc   /etc/auto.misc
/net    -hosts
/nishome        /etc/auto.nis --timeout 60
+auto.master

thanks
Matus

Comment 3 Jeff Moyer 2008-03-04 18:42:39 UTC
(In reply to comment #2)
> hi sorry,
> 
> I copied the auto.master after i have edited and tried with auto.home which
worked.
> 
> Please tried it this way
> 
> it should be 
> 
> /etc/auto.master contain:
> /nishome        /etc/auto.nis --timeout 60

As I mentioned, I already did try it this way and it worked for me.  Now please
provide the information I requested in comment #1.

Thanks.

Comment 4 matus 2008-03-04 18:56:27 UTC
sorry again, bit tired and didn't read your post properly

I cannot upgrade kernel as this environment is for training purposes and I don't
have redhat subscription.
Also need to confirm that as bug if you can. 

This message I got after enabling debug logging

Mar  4 19:51:24 station1 automount[4028]: Starting automounter version
5.0.1-0.rc2.55, master map auto.master
Mar  4 19:51:24 station1 automount[4028]: using kernel protocol version 5.00
Mar  4 19:51:24 station1 automount[4028]: master_error: syntax error while
parsing map.
Mar  4 19:51:24 station1 automount[4028]: master_notify: syntax error in map
near [ bogus option ]
Mar  4 19:51:24 station1 automount[4028]: lookup_read_master: lookup(yp): read
of master map auto.master failed: Internal NIS error
Mar  4 19:51:24 station1 automount[4028]: lookup_read_master: lookup(file):
failed to read included master map auto.master

Thanks

Comment 5 Jeff Moyer 2008-03-04 19:17:57 UTC
(In reply to comment #4)
> I cannot upgrade kernel as this environment is for training purposes and I don't
> have redhat subscription.
> Also need to confirm that as bug if you can. 

I'm not sure what you're asking.  You will definitely run into problems with the
5.1 kernel.

> This message I got after enabling debug logging
> 
> Mar  4 19:51:24 station1 automount[4028]: Starting automounter version
> 5.0.1-0.rc2.55, master map auto.master
> Mar  4 19:51:24 station1 automount[4028]: using kernel protocol version 5.00
> Mar  4 19:51:24 station1 automount[4028]: master_error: syntax error while
> parsing map.
> Mar  4 19:51:24 station1 automount[4028]: master_notify: syntax error in map
> near [ bogus option ]

Yeah, okay, I reproduced it.  It is barfing on "--timeout 60".  You can work
around this by specifying "--timeout=60".  This was fixed in:

* Wed Oct 24 2007 Ian Kent <ikent> - 5.0.1-0.rc2.56
- Bug 332181: [RHEL4] autofs initscript doesn't support '--timeout' with whitespace

So updating autofs will fix this issue.

*** This bug has been marked as a duplicate of 332181 ***

Comment 6 matus 2008-03-04 19:37:25 UTC
hi, 
but even with specifying --timeout=60 still can not mount folders at all, if I'm
using map file with name auto.nis, but changing name to auto.something and
changing map file to auto.something in auto.master than the mounting is working
(at second time but working)
I know that is not big issue, but need to find out if this is known behavior of
Autofs5.0.1-0.rc2.55

Mar  4 20:22:33 station1 automount[4146]: Starting automounter version
5.0.1-0.rc2.55, master map auto.master
Mar  4 20:22:33 station1 automount[4146]: using kernel protocol version 5.00
Mar  4 20:22:33 station1 automount[4146]: lookup_read_master: lookup(yp): read
of master map auto.master failed: Internal NIS error
Mar  4 20:22:33 station1 automount[4146]: lookup_read_master: lookup(file):
failed to read included master map auto.master
Mar  4 20:22:33 station1 automount[4146]: mounted indirect mount on /misc with
timeout 300, freq 75 seconds
Mar  4 20:22:33 station1 automount[4146]: ghosting enabled
Mar  4 20:22:33 station1 automount[4146]: mounted indirect mount on /net with
timeout 300, freq 75 seconds
Mar  4 20:22:33 station1 automount[4146]: ghosting enabled
Mar  4 20:22:33 station1 automount[4146]: lookup_read_map: lookup(yp): read of
map /nishome failed: Request arguments bad
Mar  4 20:22:33 station1 automount[4146]: mount_autofs_indirect: failed to read
map for /nishome
Mar  4 20:22:33 station1 automount[4146]: handle_mounts: mount of /nishome failed!
Mar  4 20:22:33 station1 automount[4146]: master_do_mount: failed to startup mount
Mar  4 20:25:28 station1 automount[4146]: lookup_read_master: lookup(yp): read
of master map auto.master failed: Internal NIS error
Mar  4 20:25:28 station1 automount[4146]: lookup_read_master: lookup(file):
failed to read included master map auto.master
Mar  4 20:25:28 station1 automount[4146]: lookup_read_map: lookup(yp): read of
map /nishome failed: Request arguments bad
Mar  4 20:25:28 station1 automount[4146]: mount_autofs_indirect: failed to read
map for /nishome
Mar  4 20:25:28 station1 automount[4146]: handle_mounts: mount of /nishome failed!
Mar  4 20:25:28 station1 automount[4146]: master_do_mount: failed to startup mount 

Comment 7 Jeff Moyer 2008-03-04 19:57:40 UTC
OK, then we're looking at more than one problem.

Sure enough, the automount daemon thinks that the map source is nis when it is
actually a file map.  Hmm, updating to a newer version of autofs shows this in
the debug logs:

Mar  4 14:36:15 sig11 automount[21623]: lookup_nss_read_map: reading map nis
/etc/auto.--timeout=60

Sorry it took me so long to come around.  It's probably a bug in the tokenizer.
 Ian probably can identify it pretty quickly.

Comment 8 Ian Kent 2008-03-05 02:29:01 UTC
Yep, quite likely.
I'll have a look soon as I can.

Ian


Comment 9 Ian Kent 2008-03-06 04:00:15 UTC
Created attachment 296991 [details]
Patch to prevent tokenizer getting confused with map type in map name

I think this is reasonable since the map type and the
multi map separator "must" be preceded by white space.

I'll need to do more testing but the patch is here
in case anyone else is able to test it. It may not
apply cleanly to older revisions so if it is needed
and there is any confusion I'll produce one for the
revision needed.

Ian

Comment 10 Ian Kent 2008-03-06 04:06:11 UTC
Created attachment 296992 [details]
Correction for the map type in map name patch

Oops!

Comment 11 Ian Kent 2008-03-06 04:12:34 UTC
Created attachment 296994 [details]
And another correction

Crikey!

Comment 12 Ian Kent 2008-03-30 03:52:16 UTC
Created attachment 299606 [details]
Patch to prevent tokenizer getting confused with map type in map name

Yet another try at getting this right.

Comment 13 RHEL Program Management 2008-06-02 20:15:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 18 errata-xmlrpc 2009-01-20 21:45:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0178.html


Note You need to log in before you can comment on or make changes to this bug.