Bug 132105

Summary: autofs (automount) failover does not work
Product: Red Hat Enterprise Linux 3 Reporter: Paul Waterman <paulwaterman>
Component: kernelAssignee: Jeff Moyer <jmoyer>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: petrides, tao
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:05:31 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:
Bug Depends On:    
Bug Blocks: 181405    

Description Paul Waterman 2004-09-08 20:27:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5)
Gecko/20031007

Description of problem:
(Note that this problem apparently also exists in earlier versions of
autofs -- e.g. autofs-3.1.7-41 in RHEL 3.0 Update 2. We have only just
noticed it due to the new functionality in RHEL 3.0 Update 3 which
seeks out the best connection.)

If you have an automount map entry with multiple potential mount
sources and the automounter fails to mount one of those entries, it
will return a failure without attempting to mount the other entries.


Version-Release number of selected component (if applicable):
autofs-4.1.3-12

How reproducible:
Always

Steps to Reproduce:
1. Add "  localhost:/path/does/not/exist/&" as a secondary mount
source to the end of an automount map entry.
2. Restart autofs (e.g., `service autofs restart`)
3. Make sure that the automount point not currently mounted (e.g.,
`umount /mnt/auto/filesystem`).
3. Attempt to change directories to the automount point (e.g., `cd
/mnt/auto/filesystem`). autofs will determine that the localhost entry
is the closest on the network, attempt to mount it, fail, and not
attempt to mount the automount entry from other mount sources.

Actual Results:  # verify /apps/vendor/bin not mounted
% ls /apps/vendor
./  ../

# now automount /apps/vendor/bin and verify
% ls -ld /apps/vendor/bin
drwxr-xr-x    3 toolsadm daemon      12288 Sep  2 12:03 /apps/vendor/bin/

# edit /etc/auto.appsvendor
% vi /etc/auto.appsvendor

# Verify /apps/vendor/bin entry has been updated
% grep ^bin /etc/auto.appsvendor
bin ahfil03:/vol/vol0_03/software/vendor/&   
ahfil01:/vol/vol0_01/software/vendor/& localhost:/path/does/not/exist/&

# restart autofs
% service autofs restart
umount2: Device or resource busy                           [  OK  ]
umount: /apps/public: device is busy
umount2: Device or resource busy
umount: /home: device is busy

Starting automount:                                        [  OK  ]

# unmount /apps/vendor/bin
% umount /apps/vendor/bin

# verify /apps/vendor/bin not mounted
% ls /apps/vendor
./  ../

# try to automount /apps/vendor/bin and verify
% ls -ld /apps/vendor/bin
/bin/ls: /apps/vendor/bin: No such file or directory

# check out syslog entries
% tail -4 /var/log/messages
Sep  8 15:27:34 lnxtst04 automount[7097]: >> mount: special device
/path/does/not/exist/bin does not exist
Sep  8 15:27:34 lnxtst04 automount[7097]: failed to mount /apps/vendor/bin
Sep  8 15:27:34 lnxtst04 automount[7099]: >> mount: special device
/path/does/not/exist/bin does not exist
Sep  8 15:27:34 lnxtst04 automount[7099]: failed to mount /apps/vendor/bin



Expected Results:  The mount attempt should have failed over to one of
the good entries and we should have been able to access
/apps/vendor/bin normally.

Additional info:

Comment 2 Eric Paris 2004-09-17 21:12:51 UTC
Localhost always win the selection process using the get_best_mount in
autofs-4.1.3-12.  But the same behavior is found when you use a map like

mountkey    hostA:/exported/dir  hostB:/not/exported/dir

and hostB wins the selection.  It cannot mount the directory because
it is not exported and fails rather than trying hostA.

Comment 3 Jeff Moyer 2004-09-23 12:36:52 UTC

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

Comment 4 Red Hat Bugzilla 2006-02-21 19:05:31 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Comment 5 Ernie Petrides 2006-04-25 03:32:01 UTC
A fix for this problem has just been committed to the RHEL3 U8
patch pool this evening (in kernel version 2.4.21-40.10.EL).


Comment 6 Ernie Petrides 2006-04-28 21:47:28 UTC
Adding a couple dozen bugs to CanFix list so I can complete the stupid advisory.