Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 161222 Details for
Bug 240972
autofs does not log enough data to troubleshoot replicated server selection
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Log debug information to help troubleshoot replicated server problems.
autofs-4.1.3-replicated-server-selection-debug.patch (text/plain), 5.63 KB, created by
Jeff Moyer
on 2007-08-13 20:27:48 UTC
(
hide
)
Description:
Log debug information to help troubleshoot replicated server problems.
Filename:
MIME Type:
Creator:
Jeff Moyer
Created:
2007-08-13 20:27:48 UTC
Size:
5.63 KB
patch
obsolete
>--- autofs-4.1.3/modules/replicated.c.replicated-server-debug 2007-08-13 16:13:09.000000000 -0400 >+++ autofs-4.1.3/modules/replicated.c 2007-08-13 16:17:19.000000000 -0400 >@@ -382,7 +382,10 @@ static unsigned int get_nfs_info(struct > unsigned int supported = 0; > double taken = 0; > int status, count = 0; >+ char logbuf[256]; > >+ debug("%s: called for host %s %s, version 0x%x\n", __FUNCTION__, >+ host->name, proto, version); > memset(&parms, 0, sizeof(struct pmap)); > > parms.pm_prog = NFS_PROGRAM; >@@ -407,6 +410,10 @@ static unsigned int get_nfs_info(struct > taken += random(); > count++; > supported = NFS4_SUPPORTED; >+ sprintf(logbuf, >+ "%s: nfs v4 random number: %f\n", >+ __FUNCTION__, taken); >+ debug((const char *)logbuf); > } else { > gettimeofday(&start, &tz); > status = rpc_ping_proto(rpc_info); >@@ -415,6 +422,10 @@ static unsigned int get_nfs_info(struct > taken += elapsed(start, end); > count++; > supported = NFS4_SUPPORTED; >+ sprintf(logbuf, >+ "%s: v4 rpc ping time: %f\n", >+ __FUNCTION__, elapsed(start, end)); >+ debug((const char *)logbuf); > } > } > } >@@ -447,9 +458,13 @@ v3_ver: > status = rpc_tcp_getclient(rpc_info, NFS_PROGRAM, NFS3_VERSION); > if (status) { > if (ap.random_multimount) { >- taken += random(); >+ double tmp = random(); >+ taken += tmp; > count++; > supported |= NFS3_SUPPORTED; >+ sprintf(logbuf, "%s: nfs v3 random number: %f\n", >+ __FUNCTION__, tmp); >+ debug((const char *)logbuf); > } else { > gettimeofday(&start, &tz); > status = rpc_ping_proto(rpc_info); >@@ -458,6 +473,9 @@ v3_ver: > taken += elapsed(start, end); > count++; > supported |= NFS3_SUPPORTED; >+ sprintf(logbuf, "%s: v3 rpc ping time: %f\n", >+ __FUNCTION__, elapsed(start, end)); >+ debug((const char *)logbuf); > } > } > } >@@ -483,9 +501,13 @@ v2_ver: > status = rpc_tcp_getclient(rpc_info, NFS_PROGRAM, NFS2_VERSION); > if (status) { > if (ap.random_multimount) { >- taken += random(); >+ double tmp = random(); >+ taken += tmp; > count++; > supported |= NFS2_SUPPORTED; >+ sprintf(logbuf, "%s: nfs v2, random number: %f\n", >+ __FUNCTION__, tmp); >+ debug((const char *)logbuf); > } else { > gettimeofday(&start, &tz); > status = rpc_ping_proto(rpc_info); >@@ -494,6 +516,9 @@ v2_ver: > taken += elapsed(start, end); > count++; > supported |= NFS2_SUPPORTED; >+ sprintf(logbuf, "%s: v4 rpc ping time: %f\n", >+ __FUNCTION__, elapsed(start, end)); >+ debug((const char *)logbuf); > } > } > } >@@ -517,6 +542,9 @@ done_ver: > /* Allow for user bias */ > if (host->weight) > host->cost *= (host->weight + 1); >+ >+ debug("%s: host %s cost %ld, weight %d\n", __FUNCTION__, >+ host->name, host->cost, host->weight); > } > > return supported; >@@ -576,7 +604,10 @@ static int get_supported_ver_and_cost(st > double taken = 0; > time_t timeout = RPC_TIMEOUT; > int status; >+ char logbuf[256]; > >+ debug("%s: called with host %s, version 0x%x\n", __FUNCTION__, >+ host->name, version); > memset(&pm_info, 0, sizeof(struct conn_info)); > memset(&rpc_info, 0, sizeof(struct conn_info)); > memset(&parms, 0, sizeof(struct pmap)); >@@ -655,14 +686,21 @@ static int get_supported_ver_and_cost(st > else > status = rpc_tcp_getclient(&rpc_info, NFS_PROGRAM, parms.pm_vers); > if (status) { >- if (ap.random_multimount) >+ if (ap.random_multimount) { > taken = random(); >- else { >+ sprintf(logbuf, >+ "%s: random number %f\n", __FUNCTION__, taken); >+ debug((const char *)logbuf); >+ } else { > gettimeofday(&start, &tz); > status = rpc_ping_proto(&rpc_info); > gettimeofday(&end, &tz); >- if (status) >+ if (status) { > taken = elapsed(start, end); >+ sprintf(logbuf, "%s: rpc ping time %f\n", >+ __FUNCTION__, taken); >+ debug((const char *)logbuf); >+ } > } > } > done: >@@ -682,8 +720,8 @@ done: > if (host->weight) > host->cost *= (host->weight + 1); > >- debug("%s: host %s, cost %ld\n", >- __FUNCTION__, host->name, host->cost); >+ debug("%s: cost %ld, weight %d\n", >+ __FUNCTION__, host->cost, host->weight); > return 1; > } > >@@ -781,18 +819,31 @@ int prune_host_list(struct host **list, > max_udp_count = mmax(v4_udp_count, v3_udp_count, v2_udp_count); > max_count = max(max_tcp_count, max_udp_count); > >- if (max_count == v4_tcp_count) >+ if (max_count == v4_tcp_count) { > selected_version = NFS4_TCP_SUPPORTED; >- else if (max_count == v3_tcp_count) >+ debug("%s: selected the subset of hosts that support NFS4 " >+ "over TCP", __FUNCTION__); >+ } else if (max_count == v3_tcp_count) { > selected_version = NFS3_TCP_SUPPORTED; >- else if (max_count == v2_tcp_count) >+ debug("%s: selected the subset of hosts that support NFS3 " >+ "over TCP", __FUNCTION__); >+ } else if (max_count == v2_tcp_count) { > selected_version = NFS2_TCP_SUPPORTED; >- else if (max_count == v4_udp_count) >+ debug("%s: selected the subset of hosts that support NFS2 " >+ "over TCP", __FUNCTION__); >+ } else if (max_count == v4_udp_count) { > selected_version = NFS4_UDP_SUPPORTED; >- else if (max_count == v3_udp_count) >+ debug("%s: selected the subset of hosts that support NFS4 " >+ "over UDP", __FUNCTION__); >+ } else if (max_count == v3_udp_count) { > selected_version = NFS3_UDP_SUPPORTED; >- else if (max_count == v2_udp_count) >+ debug("%s: selected the subset of hosts that support NFS3 " >+ "over UDP", __FUNCTION__); >+ } else if (max_count == v2_udp_count) { > selected_version = NFS2_UDP_SUPPORTED; >+ debug("%s: selected the subset of hosts that support NFS2 " >+ "over UDP", __FUNCTION__); >+ } > > /* Add local and hosts with selected version to new list, unless > * random replicated server selection was requested. In that case
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240972
:
161196
| 161222