Bug 223083

Summary: autofs failed to mount using wildkey and replicated configuration
Product: Red Hat Enterprise Linux 4 Reporter: Jeff Moyer <jmoyer>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: urgent Docs Contact:
Priority: medium    
Version: 4.0CC: djoo, hyunmo.kang, ikent, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0734 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:02:10 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
Backport of the v5 replicated server code
none
Backport the replicated server selection code from autofs v5
none
Backport the v5 replicated server selection code, and include the random multimount selection bits
none
Keep the random selection from overflowing none

Description Jeff Moyer 2007-01-17 20:06:04 UTC
+++ This bug was initially created as a clone of Bug #219434 +++

Description of problem:
automount fails to mount using a certain automount map.

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

How reproducible:
always

Steps to Reproduce:
1.
configure automount map as following

#auto.master
/words auto.words

#auto.words
* host1:/a/& host1:/b/& host2:/c/& host2:/d/&

2.
say words are classified into seperate location in an alphabetical order

3.
access "/words/bat" or "/words/dog"

Actual results:
mount fails

Expected results:

Additional info:
i have looked into source code.
when some path on a host is failed to mount, 
any trial to mount different path on the same host is ignored.
that, however, should not happen in my configuration.
on solaris and hp-ux system, i captured nfs packets and they try every location 
until they get successful mount.

-- Additional comment from jmoyer on 2007-01-17 15:04 EST --
Given that this is a deviation from the behaviour under Solaris, this is
certainly a bug.

Comment 1 Jeff Moyer 2007-01-22 20:36:28 UTC
Created attachment 146224 [details]
Backport of the v5 replicated server code

This is a rough backport of the replicated server code found in v5.  I tested
it only with a simple map related to this bugzilla.  Much, much, much, much,
much more testing is required before this gets committed.

Comment 2 Jeff Moyer 2007-01-22 23:30:10 UTC
Created attachment 146253 [details]
Backport the replicated server selection code from autofs v5

This patch fixes a locking issue that I had in the last one.  I also tested it
a bit more extensively.

Comment 3 Jeff Layton 2007-01-23 12:54:32 UTC
*** Bug 199720 has been marked as a duplicate of this bug. ***

Comment 5 Jeff Moyer 2007-01-23 17:58:00 UTC
Created attachment 146325 [details]
Backport the v5 replicated server selection code, and include the random multimount selection bits

This is the patch that was committed to CVS.  It is available in
autofs-4.1.3-209.

Comment 8 RHEL Program Management 2007-05-09 08:15:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 12 Jeff Moyer 2007-09-04 17:01:41 UTC
Created attachment 186291 [details]
Keep the random selection from overflowing

This code failed the /CoreOS/autofs/bugzillas/bz200560 regression test on s390.


The problem is that the random number selected can overflow when the cost for a
server is calculated.  The fix is to normalize the random number to a value
between 0 and 1, which mimics the results returned (in general) from timing the
rpc ping to a particular server.

Comment 15 Jeff Moyer 2007-09-05 18:58:08 UTC
A fix for this issue was committed to autofs version 4.1.3-231.

Comment 18 errata-xmlrpc 2007-11-15 16:02:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0734.html