Bug 231188

Summary: autofs does not seem to work with -hosts anymore
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: 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: 2007-03-08 17:59:16 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 Michal Jaegermann 2007-03-06 18:33:51 UTC
Description of problem:

I have the following line in /etc/auto.hosts :

/net -hosts --timeout=60 -fstype=nfs hard,intr,nodev,nosuid,rsize=16384,wsize=16384

and '+/etc/auto.hosts' in /etc/auto.master. This used to work not
so long time ago.  After recent updates NFS mounts implied by the
above fail.  Switching in /etc/auto.master to a script of
/etc/auto.net kind (rsize and wsize are the same like on a line
quoted above) gets these automounts going again.

Version-Release number of selected component (if applicable):
autofs-5.0.1-3

How reproducible:
always

Comment 1 Ian Kent 2007-03-07 12:39:44 UTC
(In reply to comment #0)
> Description of problem:
> 
> I have the following line in /etc/auto.hosts :
> 
> /net -hosts --timeout=60 -fstype=nfs
hard,intr,nodev,nosuid,rsize=16384,wsize=16384
> 
> and '+/etc/auto.hosts' in /etc/auto.master. This used to work not
> so long time ago.  After recent updates NFS mounts implied by the
> above fail.  Switching in /etc/auto.master to a script of
> /etc/auto.net kind (rsize and wsize are the same like on a line
> quoted above) gets these automounts going again.

I set this up but can't seem to duplicate the problem.
Can we have a "showmount -e" of the server please.
Perhaps a debug log too.

Ian


Comment 2 Michal Jaegermann 2007-03-07 19:49:56 UTC
> Can we have a "showmount -e" of the server please.

That has to be correct or otherwise a script of /etc/auto.net
type would not work as well.  Anyway, here it is:

# showmount -e work
Export list for work:
/home         192.168.xxx.0/255.255.255.0
/var/www/html 192.168.xxx.0/255.255.255.0

> Perhaps a debug log too.
I added in /etc/sysconfig/ lines

DEFAULT_LOGGING="debug"
OPTIONS="-d"

This does not seem to be showing that much.  Here is with
'+/etc/auto.hosts' line in /etc/auto.master; start, attempt
to access directories and stop:

automount[3575]: Starting automounter version 5.0.1-3, master map auto.master
automount[3575]: using kernel protocol version 5.00
automount[3575]: mounted indirect mount on /net with timeout 60, freq 15 seconds
automount[3575]: attempting to mount entry /net/work
automount[3575]: lookup_mount: exports lookup failed for work
automount[3575]: failed to mount /net/work
automount[3575]: attempting to mount entry /net/work
automount[3575]: lookup_mount: exports lookup failed for work
automount[3575]: failed to mount /net/work
automount[3575]: umounted indirect mount /net
automount[3575]: shut down path /net

This is what I am seeing when uset /etc/auto.net script:

automount[3637]: Starting automounter version 5.0.1-3, master map auto.master
automount[3637]: using kernel protocol version 5.00
automount[3637]: mounted indirect mount on /net with timeout 60, freq 15 seconds
automount[3637]: attempting to mount entry /net/work
automount[3637]: mounted /net/work

and all expected directories are there.

This is on x86_64.  Any relevance?

Comment 3 Michal Jaegermann 2007-03-07 20:06:00 UTC
BTW - instead of the original /etc/auto.net I am using the following
scripts which does not require calls to awk:

#!/bin/sh

key="$1"
opts="-fstype=nfs,hard,intr,nodev,nosuid,rsize=16384,wsize=16384"
SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key"
$SHOWMOUNT > /dev/null || exit 1
$SHOWMOUNT | LC_ALL=C sort -k 1  | \
    while read -r fs rest ; do
        if [ "$follow" = "" ] ; then
            echo -n "$opts"
            follow=1
        fi
        echo " \\"
        echo -n "       $fs $key:$fs"
    done
echo

In the case of a server 'work' in question this produces, as expected:

-fstype=nfs,hard,intr,nodev,nosuid,rsize=16384,wsize=16384 \
        /home work:/home \
        /var/www/html work:/var/www/html


Comment 4 Ian Kent 2007-03-08 01:49:40 UTC
(In reply to comment #2)
> > Can we have a "showmount -e" of the server please.
> 
> That has to be correct or otherwise a script of /etc/auto.net
> type would not work as well.  Anyway, here it is:
> 
> # showmount -e work
> Export list for work:
> /home         192.168.xxx.0/255.255.255.0
> /var/www/html 192.168.xxx.0/255.255.255.0

Yep, they should be fine.

> 
> > Perhaps a debug log too.
> I added in /etc/sysconfig/ lines
> 
> DEFAULT_LOGGING="debug"

Yep.

> OPTIONS="-d"

Not needed with above option set.

> 
> This does not seem to be showing that much.  Here is with
> '+/etc/auto.hosts' line in /etc/auto.master; start, attempt
> to access directories and stop:

You need to increase the log level for facility daemon
otherwise you won't see much.

Ian


Comment 5 Ian Kent 2007-03-08 09:11:43 UTC
(In reply to comment #2)
> > Can we have a "showmount -e" of the server please.
> 
> That has to be correct or otherwise a script of /etc/auto.net
> type would not work as well.  Anyway, here it is:
> 
> # showmount -e work
> Export list for work:
> /home         192.168.xxx.0/255.255.255.0
> /var/www/html 192.168.xxx.0/255.255.255.0

Think I've found the problem.
I've sent autofs-5.0.1-0.rc3.26 on its way to testing.
Can you try it when it arrives on the mirrors please.

Ian


Comment 6 Michal Jaegermann 2007-03-08 17:59:16 UTC
> Think I've found the problem.

With autofs-5.0.1-4 from the current rawhide '-hosts' entries
work for me again.