Bug 192800

Summary: Bizarre autofs mount points with script generated maps
Product: [Fedora] Fedora Reporter: Daniel Qarras <dqarras>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: ikent, jmoyer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-06-28 11:53:58 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:
Attachments:
Description Flags
autofs debug output none

Description Daniel Qarras 2006-05-23 07:30:36 UTC
Description of problem:
With static autofs map I get directories /var/autofs/home and /var/autofs/net
all ok but with a script outputting a corresponding map I get bizarre mounts
like /var/autofs/(null) and /var/autofs/whatever that have contents of /home or
/net or recursively directories /home and /net. /var/autofs/$SERVER_IP has
correctly /home and /net directories but also (null) directory.

My /etc/auto.master:
/var/autofs     /etc/auto.local --ghost --debug --timeout=30

And /etc/auto.local (executable):
#!/bin/sh
PARAMS="-fstype=nfs,hard,intr,nodev,nosuid"
SERVER="$1"
echo $PARAMS /home $SERVER:/home /net $SERVER:/net

Version-Release number of selected component (if applicable):
autofs: autofs-4.1.4-19
kernel: 2.6.16-1.2111_FC5

How reproducible:
Usually always ;) I'd be delighted to know if this is just a luser error but
those (null) directories seem to indicate that that is not the case.

Steps to Reproduce:
1. Create mentioned map file
2. Stop & start autofs
3. cd /var/autofs
  
Actual results:
Strange directories.

Expected results:
Only the two configured directories.

Additional info:
I will attach /var/log/debug that was as instructed at
http://people.redhat.com/jmoyer/. It was created with these commands:

/etc/init.d/autofs start
cd /var/autofs/hello
ls
ls net
cd /var/autofs/192.168.1.1
ls
cd
/etc/init.d/autofs stop

Comment 1 Daniel Qarras 2006-05-23 07:32:01 UTC
Created attachment 129844 [details]
autofs debug output

Comment 2 Ian Kent 2006-05-23 08:42:11 UTC
(In reply to comment #0)
> Description of problem:
> With static autofs map I get directories /var/autofs/home and /var/autofs/net
> all ok but with a script outputting a corresponding map I get bizarre mounts
> like /var/autofs/(null) and /var/autofs/whatever that have contents of /home or
> /net or recursively directories /home and /net. /var/autofs/$SERVER_IP has
> correctly /home and /net directories but also (null) directory.

As I said previously I'm not able to track down why we are seeing
requests for the path element "(null)". At this stage I think they
are actually coming from the VFS so as far as the kernel module
is concerned they are valid.

However, they seem always to follow a mount fail whch introduces
another problem which I have an experimental patch for.

Are you able to test the experimental kernel patch?

Ian


Comment 3 Daniel Qarras 2006-05-23 09:32:06 UTC
Yes. Feel free to provide a patch for testing. Please also inform what should
change with the patch compared to current situation?

Comment 4 Ian Kent 2006-05-23 13:33:55 UTC
(In reply to comment #3)
> Yes. Feel free to provide a patch for testing. Please also inform what should
> change with the patch compared to current situation?

Hang on, what kernel version will you use?
I'll do a patch for it.

What I would expect to see are immediate failures for mounts
that fail and consequently no "(null)" directories for a start.

Comment 5 Daniel Qarras 2006-05-24 07:10:26 UTC
I'm using kernel-2.6.16-1.2122_FC5.

Thanks.

Comment 6 Ian Kent 2006-06-16 01:10:38 UTC
Daniel,

This issue has been traced to libselinux and is fixed in
libselinux-1.30.3-3.fc5 which is currently in the FC5 updates
testing area. Could you please check that this does indeed
fix the problem you are seeing.

Ian


Comment 7 Daniel Qarras 2006-06-21 08:32:25 UTC
Hi Ian,

I now tested this with libselinux-1.30.3-3.fc5 and kernel-2.6.16-1.2133_FC5. The
good news is that the strange (null) directory is totally gone, no signs of it
at server logs or at the client.

However, other bizarre mount points still exist, ie:

/etc/init.d/autofs restart
cd /var/autofs/hello
cd hallo
ls
ls net
/etc/init.d/autofs stop

still gets me to directory /var/autofs/hello/hallo and there are the directories
home and net recursively (ie, under net are home and net and under them are home
and net, etc).

Thanks!

Comment 8 Ian Kent 2006-06-21 14:50:12 UTC
(In reply to comment #7)

Hi Daniel,

> However, other bizarre mount points still exist, ie:

Ha, never ending story.

> 
> /etc/init.d/autofs restart
> cd /var/autofs/hello
> cd hallo
> ls
> ls net
> /etc/init.d/autofs stop
> 
> still gets me to directory /var/autofs/hello/hallo and there are the directories
> home and net recursively (ie, under net are home and net and under them are home
> and net, etc).

OK. I should be able to reproduce this with the info. you've
provided.

I'll let you know how I go.

Ian



Comment 9 Ian Kent 2006-06-23 08:03:44 UTC
(In reply to comment #8)
> (In reply to comment #7)

> Hi Daniel,

Finally got to this.

> 
> > However, other bizarre mount points still exist, ie:

snip ...

> 
> OK. I should be able to reproduce this with the info. you've
> provided.
> 

And I have been able to duplicate the problem.

Ian


Comment 10 Ian Kent 2006-06-23 09:42:31 UTC
(In reply to comment #9)
> 
> > 
> > OK. I should be able to reproduce this with the info. you've
> > provided.
> > 
> 
> And I have been able to duplicate the problem.

I'm fairly sure that if you remove the "--ghost" option this will
work the way you expect it to.



Comment 11 Daniel Qarras 2006-06-26 08:50:10 UTC
Removing the "--ghost" option does not help. I can still do this:

/etc/init.d/autofs restart
cd /var/autofs/hello
cd hallo
ls
ls net/net
/etc/init.d/autofs stop

In /var/log/messages I see errors like:

Jun 26 11:46:43 ws6 automount[2814]: attempting to mount entry /var/autofs/hello
Jun 26 11:46:43 ws6 automount[2821]: mount(nfs): host hello: lookup failure
Jun 26 11:46:43 ws6 automount[2821]: >> mount: can't get address for hello
Jun 26 11:46:43 ws6 automount[2821]: mount(nfs): nfs: mount failure hello:/net
on /var/autofs/hello/net
Jun 26 11:46:44 ws6 automount[2821]: mount(nfs): host hello: lookup failure
Jun 26 11:46:44 ws6 automount[2821]: >> mount: can't get address for hello
Jun 26 11:46:44 ws6 automount[2821]: mount(nfs): nfs: mount failure hello:/home
on /var/autofs/hello/home
Jun 26 11:46:50 ws6 automount[2814]: attempting to mount entry
/var/autofs/hello/hallo
Jun 26 11:46:50 ws6 automount[2826]: mount(nfs): host hello/hallo: lookup failure
Jun 26 11:46:50 ws6 automount[2826]: >> mount: can't get address for hello/hallo
Jun 26 11:46:50 ws6 automount[2826]: mount(nfs): nfs: mount failure
hello/hallo:/net on /var/autofs/hello/hallo/net
Jun 26 11:46:50 ws6 automount[2826]: mount(nfs): host hello/hallo: lookup failure
Jun 26 11:46:50 ws6 automount[2826]: >> mount: can't get address for hello/hallo
Jun 26 11:46:50 ws6 automount[2826]: mount(nfs): nfs: mount failure
hello/hallo:/home on /var/autofs/hello/hallo/home
Jun 26 11:47:08 ws6 automount[2814]: attempting to mount entry
/var/autofs/hello/hallo/net
Jun 26 11:47:08 ws6 automount[2833]: mount(nfs): host hello/hallo/net: lookup
failure
Jun 26 11:47:08 ws6 automount[2833]: >> mount: can't get address for hello/hallo/net
Jun 26 11:47:08 ws6 automount[2833]: mount(nfs): nfs: mount failure
hello/hallo/net:/net on /var/autofs/hello/hallo/net/net
Jun 26 11:47:08 ws6 automount[2833]: mount(nfs): host hello/hallo/net: lookup
failure
Jun 26 11:47:08 ws6 automount[2833]: >> mount: can't get address for hello/hallo/net
Jun 26 11:47:08 ws6 automount[2833]: mount(nfs): nfs: mount failure
hello/hallo/net:/home on /var/autofs/hello/hallo/net/home
Jun 26 11:47:08 ws6 automount[2814]: attempting to mount entry
/var/autofs/hello/hallo/net/net
Jun 26 11:47:09 ws6 automount[2838]: mount(nfs): host hello/hallo/net/net:
lookup failure
Jun 26 11:47:09 ws6 automount[2838]: >> mount: can't get address for
hello/hallo/net/net
Jun 26 11:47:09 ws6 automount[2838]: mount(nfs): nfs: mount failure
hello/hallo/net/net:/net on /var/autofs/hello/hallo/net/net/net
Jun 26 11:47:09 ws6 automount[2838]: mount(nfs): host hello/hallo/net/net:
lookup failure
Jun 26 11:47:09 ws6 automount[2838]: >> mount: can't get address for
hello/hallo/net/net
Jun 26 11:47:09 ws6 automount[2838]: mount(nfs): nfs: mount failure
hello/hallo/net/net:/home on /var/autofs/hello/hallo/net/net/home


Comment 12 Ian Kent 2006-06-27 13:36:51 UTC
(In reply to comment #11)
> Removing the "--ghost" option does not help. I can still do this:

The only way to work around this is to add the "-strict" option to
the mount in the master map.

This has come about because there were compaints about requiring all
mounts in a multi-mount to succeed in order for any of the mounts to
be left mounted so the default option was changed from "strict" to
"nonstrict".

Try this option and let me know what happens.

Ian


Comment 13 Daniel Qarras 2006-06-28 08:08:06 UTC
Hi! Adding the "-strict" option to PARAMS in the above mentioned auto.local
indeed fixes the problem! "-strict" also plays nicely with "--ghost" in
auto.master. I guess this is fully solved now. Thanks a lot!

Comment 14 Ian Kent 2006-06-28 11:53:58 UTC
(In reply to comment #13)
> Hi! Adding the "-strict" option to PARAMS in the above mentioned auto.local
> indeed fixes the problem! "-strict" also plays nicely with "--ghost" in
> auto.master. I guess this is fully solved now. Thanks a lot!

Great, Thanks for letting me know.