Bug 139417 - [autofs] replicated host choice algorithm ignores weights in favor of local mounts
Summary: [autofs] replicated host choice algorithm ignores weights in favor of local m...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chris Feist
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-15 21:42 UTC by David Lehman
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-24 21:50:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Lehman 2004-11-15 21:42:17 UTC
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. 


autofs-4.1.3-12

How reproducible:
Always

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 22:25:47 UTC
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 22:33:02 UTC
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 21:50:10 UTC
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.