Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 139417 - [autofs] replicated host choice algorithm ignores weights in favor of local mounts
[autofs] replicated host choice algorithm ignores weights in favor of local m...
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2004-11-15 16:42 EST by David Lehman
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-24 16:50:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Lehman 2004-11-15 16:42:17 EST
Description of problem:
autofs always chooses a local entry, if present. This is fine in the general
case, but not when weights have been explicitly assigned to the hosts such that
localhost only be chosen as a last resort. 


How reproducible:

Steps to Reproduce:
1. Set up a replicated entry in /etc/auto.misc (eg: 'rep
host1(1):/exports/e1,localhost(10):/exports/e2) and restart autofs
2. ls /misc/rep
3. cat /proc/mounts | grep nfs
Actual results:
The localhost mount was chosen in spite of it's higher weight.

Expected results:
host1's export should have been mounted since it was given the lower weight.

Additional info:
See /usr/share/doc/autofs-4.1.3/README.replicated-server for explanation of
professed behavior.
Comment 1 Jeff Moyer 2004-11-15 17:25:47 EST
It is our goal to maintain compatibility with the Sun automounter, so
that it will integrate seemlessly in mixed environments.  To that end,
 please refer to the Sun documentation for the desired behaviour, and
report bugs on devaiations there from.

In this particular instance, the following paragraph from the Sun
automount(1M) man page apply:

  Server proximity takes priority in the selection process. In the 
  example above, if the server delta is on the same network segment as 
  the client, but the others are on different network segments, then 
  delta will be selected; the weighting value is ignored. The 
  weighting has effect only when selecting between servers with the  
  same network proximity.

I'm a little puzzled by what the client is doing, here.  Why would you
want to fall back to a local mount?  In the Sun implementation,
replicated server functionality is only available if the mounts are
read-only.  In that case, why wouldn't you prefer to read the local copy?
Comment 2 David Lehman 2004-11-15 17:33:02 EST
The customer would like to be able to specify to use a local mount point last
when he has replicated servers for automount. In his case he will back up his
NFS exports locally at regular intervals, but they will be out of date since
they only sync occasionally to the nfs servers. He would only like to use this
local backup only if the two other servers become unavailable.
Comment 9 Chris Feist 2005-01-24 16:50:10 EST
Unfortunately this is the expected (but not quite documented) behavior
in the linux automounter.  I have updated the documentation to reflect
its behavior.  (We try to provide compatability as much as possible
with the Sun automounter, and it behaves this way as well).

The documentation has been updated in autofs-4.1.3-81.

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