"James Richardson" <[EMAIL PROTECTED]> writes:
> Jeff,
>
> Using the latest Autofs source code from I received the following
> results:
>
> large-rr.domain.tld contains 49 A records in DNS.
>
> small-rr.domain.tld contains 16 A records (a subset of large-rr).
>
> Test 1:
>
> I configured auto.home with the entry:
>
> brian -rsize=8192,wsize=8192,proto=tcp,vers=3
> large-rr:/home/brian
>
>
> # time ls /home/brian/.bash_history
>
> /home/brian/.bash_history
>
> real 0m0.734s
>
> user 0m0.000s
>
> sys 0m0.000s
>
>
> Test 2:
>
> I then rebooted the server to remove any local cached anything and
> updated auto.home to have:
>
> brian -rsize=8192,wsize=8192,proto=tcp,vers=3
> small-rr:/home/brian
>
>
> # time ls -alht /home/brian/.bash_history
>
> -rw------- 1 brian support 13K Nov 15 10:39
>
> real 0m0.126s
>
> user 0m0.000s
>
> sys 0m0.004s
>
>
> During Test 1 there were 1,160 DNS packets (580 UDP packets, 580 TCP
> packets). During Test 2 there were 196 packets (all UDP).
Very strange. I don't have round-robin DNS configured, but in my
testing, autofs only called into the resolver once, but there were 6-8
queries logged by tcpdump.
You can apply this patch and see what it outputs. Turn off debug
logging, as it will just clutter the logs. Results should be printed
in /var/log/messages:
Dec 21 16:37:28 sig11 automount[3763]: add_host_addrs:883: gethostbyname_r
See how many of these print. If it's not many, then we'll have to
look elsewhere for your problem (or I've missed some resolver queries
from autofs!).
-Jeff
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
index 5797639..90bf768 100644
--- a/lib/rpc_subs.c
+++ b/lib/rpc_subs.c
@@ -91,6 +91,7 @@ static CLIENT *create_udp_client(struct conn_info *info)
memset(&hp, 0, sizeof(struct hostent));
+ logerr("gethostbyname_r");
ret = gethostbyname_r(info->host, php,
buf, HOST_ENT_BUF_SIZE, &result, &ghn_errno);
if (ret || !result) {
@@ -300,6 +301,7 @@ static CLIENT *create_tcp_client(struct conn_info *info)
memset(&hp, 0, sizeof(struct hostent));
+ logerr("gethostbyname_r");
ret = gethostbyname_r(info->host, php,
buf, HOST_ENT_BUF_SIZE, &result, &ghn_errno);
if (ret || !result) {
diff --git a/modules/replicated.c b/modules/replicated.c
index 90b2925..5171beb 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -880,6 +880,7 @@ static int add_host_addrs(struct host **list, const char
*host, unsigned int wei
memset(buf, 0, MAX_IFC_BUF);
memset(&he, 0, sizeof(struct hostent));
+ logerr("gethostbyname_r");
ret = gethostbyname_r(host, phe,
buf, MAX_IFC_BUF, &result, &ghn_errno);
if (ret || !result) {
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs