Bug 435960 - autofs with map file auto.nis not working, error: automount master_error: syntax error while parsing map
autofs with map file auto.nis not working, error: automount master_error: syn...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs (Show other bugs)
5.1
i386 Linux
low Severity low
: rc
: ---
Assigned To: Ian Kent
Brock Organ
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-04 12:21 EST by matus
Modified: 2009-01-20 16:45 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:45:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description matus 2008-03-04 12:21:37 EST
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 Jeffrey Moyer 2008-03-04 12:34:34 EST
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 13:35:29 EST
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 Jeffrey Moyer 2008-03-04 13:42:39 EST
(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 13:56:27 EST
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 Jeffrey Moyer 2008-03-04 14:17:57 EST
(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@redhat.com> - 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 14:37:25 EST
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 Jeffrey Moyer 2008-03-04 14:57:40 EST
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-04 21:29:01 EST
Yep, quite likely.
I'll have a look soon as I can.

Ian
Comment 9 Ian Kent 2008-03-05 23:00:15 EST
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-05 23:06:11 EST
Created attachment 296992 [details]
Correction for the map type in map name patch

Oops!
Comment 11 Ian Kent 2008-03-05 23:12:34 EST
Created attachment 296994 [details]
And another correction

Crikey!
Comment 12 Ian Kent 2008-03-29 23:52:16 EDT
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 Product and Program Management 2008-06-02 16:15:53 EDT
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 16:45:37 EST
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.