Bug 495890 - autofs5: large number of DNS lookups for hostnames associated with multiple ip addresses.
autofs5: large number of DNS lookups for hostnames associated with multiple i...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs5 (Show other bugs)
4.7
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Ian Kent
qe-baseos-daemons
: ZStream
Depends On:
Blocks: 495895 517281
  Show dependency treegraph
 
Reported: 2009-04-15 09:33 EDT by Sachin Prabhu
Modified: 2011-02-16 09:20 EST (History)
3 users (show)

See Also:
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 09:20:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sachin Prabhu 2009-04-15 09:33:52 EDT
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 09:48:02 EDT
(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 04:22:44 EDT
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 13:54:23 EDT
Committed in autofs5-5.0.1-0.rc2.108
Comment 17 Florian Nadge 2011-01-03 11:20:10 EST
    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 09:20:30 EST
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

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