Bug 548476 - automount cannot use rpc ping to select from list of replicated servers
Summary: automount cannot use rpc ping to select from list of replicated servers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 563772
TreeView+ depends on / blocked
 
Reported: 2009-12-17 15:15 UTC by Sachin Prabhu
Modified: 2018-10-27 15:15 UTC (History)
7 users (show)

Fixed In Version: autofs-5.0.1-0.rc2.137.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 563772 (view as bug list)
Environment:
Last Closed: 2010-03-30 08:37:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch - fix random selection option (701 bytes, patch)
2009-12-17 15:47 UTC, Ian Kent
no flags Details | Diff
Patch - fix random selection option (corrected) (704 bytes, patch)
2009-12-18 04:39 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0265 0 normal SHIPPED_LIVE autofs bug fix update 2010-03-29 12:54:19 UTC

Description Sachin Prabhu 2009-12-17 15:15:15 UTC
Instead of using the server with the best RPC ping time, automount always selects the server randomly.

The -r option for autofs is not set.

/var/log/messages with autofs debug enabled in /etc/sysconfig/autofs:

Dec 10 17:04:12 xxxxxx automount[25958]: get_nfs_info: called for host server4 proto udp version 0x30 
Dec 10 17:04:12 xxxxxx automount[25958]: get_nfs_info: nfs v3 random selection time: 0.949207 
Dec 10 17:04:12 xxxxxx automount[25958]: get_nfs_info: nfs v2 random selection time: 0.505903 
Dec 10 17:04:12 xxxxxx automount[25958]: get_nfs_info: host server4 cost 727555 weight 0 

master_parser.y:
    816 	entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;

This is apparently set unconditionally so it looks like there is no
way to unset this flag.

Comment 2 Sachin Prabhu 2009-12-17 15:16:24 UTC
Patch proposed by Ian.

autofs-5.0.5 - fix random selection option

From: Ian Kent <raven themaw net>

When parsing the master map we fail to check if the random selection
option has been seen and set the random selection option unconditionally.
---

 lib/master_parse.y |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/lib/master_parse.y b/lib/master_parse.y
index 8ca7df7..2db483b 100644
--- a/lib/master_parse.y
+++ b/lib/master_parse.y
@@ -806,7 +806,8 @@ int master_parse_entry(const char *buffer, unsigned
int default_timeout, unsigne
                                ops->timeout(ap->logopt, ap->ioctlfd,
&tout);
                }
        }
-       entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
+       if (random_select)
+               entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
        if (negative_timeout)
                entry->ap->negative_timeout = negative_timeout;

Comment 3 Ian Kent 2009-12-17 15:47:32 UTC
Created attachment 379016 [details]
Patch - fix random selection option

Proposed patch without email wrap.

Comment 5 Ian Kent 2009-12-18 04:39:42 UTC
Created attachment 379149 [details]
Patch -  fix random selection option (corrected)

Oops!

Comment 14 Chris Ward 2010-02-11 10:21:19 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 19 errata-xmlrpc 2010-03-30 08:37:26 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 therefore 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-2010-0265.html


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