Bug 495890

Summary: autofs5: large number of DNS lookups for hostnames associated with multiple ip addresses.
Product: Red Hat Enterprise Linux 4 Reporter: Sachin Prabhu <sprabhu>
Component: autofs5Assignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.7CC: fnadge, jmoyer, tao
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: autofs5-5.0.1-0.rc2.108 Doc Type: Bug Fix
Doc Text:
Previously, the number of DNS lookups corresponded to the number of IP addresses returned from a host name lookup for a single NFS server. NFS servers which resolved to multiple IP addresses increased the number of DNS lookups and caused excessive system load. This update removes redundant DNS lookups for NFS servers.
Story Points: ---
Clone Of:
: 495895 (view as bug list) Environment:
Last Closed: 2011-02-16 14:20:30 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: 495895, 517281    

Description Sachin Prabhu 2009-04-15 13:33:52 UTC
autofs5 produce massive number of DNS queries when one nfs server name is associated with many IP adresses. For example when one host has 40 IP adresses associated mounting one autofs directory produce ~160 DNS queries.

steps to reproduce :

1) Configure roundrobin DNS so that the autofs client resolve host1.example.com as below .

host host1.example.com
host1.example.com has address 10.65.6.193
host1.example.com has address 10.65.7.143
host1.example.com has address 10.65.7.225
host1.example.com has address 10.65.6.128

2) nfs server exports /tmp *(ro)

on autofs5 client , configure the map such as ,

/etc/auto.master :  
/misc   /etc/auto.misc

/etc/auto.misc   :  
test            host1.example.com:/tmp

Capture the network packets using tcpdump. 
On the client cd into /misc/test.
Check the number of DNS queries in the captured dump.

The table below lists the number of host lookups for varying number of ip addresses.
1 ip : 2 DNS lookup .
2 ip : 14 DNS lookups
3 ip : 20 DNS lookups
4 ip : 26 DNS lookups

The problem is also seen with autofs on RHEL 5.

Using the following patch fixes the problem.
http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-5.0.3-remove-redundant-dns-name-lookups.patch

Comment 1 Ian Kent 2009-04-15 13:48:02 UTC
(In reply to comment #0)
> The problem is also seen with autofs on RHEL 5.

That's true.

> 
> Using the following patch fixes the problem.
> http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-5.0.3-remove-redundant-dns-name-lookups.patch  

Right, this is one of the few (I think there are probably only two
things actually) that haven't been back ported to 5.0.1 in RHEL.
Sorry about this, I'll get onto it.

Comment 3 Sachin Prabhu 2009-04-28 08:22:44 UTC
The test packages resolve the issue on RHEL 4.

The DNS lookups no longer increase with higher number of ip addresses associated with the hostname. 

If the hostname is associated with
1 ip : 2 DNS lookup 
3 ip : 2 DNS lookup
4 ip : 2 DNS lookup
5 ip : 2 DNS lookup

Comment 13 Jeff Moyer 2009-08-12 17:54:23 UTC
Committed in autofs5-5.0.1-0.rc2.108

Comment 17 Florian Nadge 2011-01-03 16:20:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the number of DNS lookups corresponded to the number of IP addresses returned from a host name lookup for a single NFS server. NFS servers which resolved to multiple IP addresses increased the number of DNS lookups and caused excessive system load. This update removes redundant DNS lookups for NFS servers.

Comment 18 errata-xmlrpc 2011-02-16 14:20:30 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-2011-0241.html