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 317031 Details for
Bug 252032
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]
Ported version 4 patch to add replicated server debug logging
autofs-5.0.1-add-replicated-debug-logging.patch (text/plain), 5.17 KB, created by
Ian Kent
on 2008-09-18 05:15:54 UTC
(
hide
)
Description:
Ported version 4 patch to add replicated server debug logging
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2008-09-18 05:15:54 UTC
Size:
5.17 KB
patch
obsolete
>5.0.3 - add replicated server selection debug logging > >From: Ian Kent <raven@themaw.net> > >Add some debug logging to the replicated server selection code. >--- > > modules/replicated.c | 86 +++++++++++++++++++++++++++++++++++++++------------ > 1 file changed, 66 insertions(+), 20 deletions(-) > > >--- autofs-5.0.1.orig/modules/replicated.c >+++ autofs-5.0.1/modules/replicated.c >@@ -400,6 +400,10 @@ static unsigned int get_nfs_info(unsigne > double taken = 0; > int status, count = 0; > >+ debug(logopt, >+ "called for host %s proto %s version 0x%x", >+ host->name, proto, version); >+ > memset(&parms, 0, sizeof(struct pmap)); > > parms.pm_prog = NFS_PROGRAM; >@@ -424,11 +428,17 @@ static unsigned int get_nfs_info(unsigne > status = rpc_ping_proto(rpc_info); > gettimeofday(&end, &tz); > if (status) { >- if (random_selection) >+ double reply; >+ if (random_selection) { > /* Random value between 0 and 1 */ >- taken += ((float) random())/((float) RAND_MAX+1); >- else >- taken += elapsed(start, end);; >+ reply = ((float) random())/((float) RAND_MAX+1); >+ debug(logopt, >+ "nfs v4 random selection time: %f", reply); >+ } else { >+ reply = elapsed(start, end); >+ debug(logopt, "nfs v4 rpc ping time: %f", reply); >+ } >+ taken += reply; > count++; > supported = NFS4_SUPPORTED; > } >@@ -465,11 +475,17 @@ v3_ver: > status = rpc_ping_proto(rpc_info); > gettimeofday(&end, &tz); > if (status) { >- if (random_selection) >+ double reply; >+ if (random_selection) { > /* Random value between 0 and 1 */ >- taken += ((float) random())/((float) RAND_MAX+1); >- else >- taken += elapsed(start, end);; >+ reply = ((float) random())/((float) RAND_MAX+1); >+ debug(logopt, >+ "nfs v3 random selection time: %f", reply); >+ } else { >+ reply = elapsed(start, end); >+ debug(logopt, "nfs v3 rpc ping time: %f", reply); >+ } >+ taken += reply; > count++; > supported |= NFS3_SUPPORTED; > } >@@ -499,11 +515,17 @@ v2_ver: > status = rpc_ping_proto(rpc_info); > gettimeofday(&end, &tz); > if (status) { >- if (random_selection) >+ double reply; >+ if (random_selection) { > /* Random value between 0 and 1 */ >- taken += ((float) random())/((float) RAND_MAX+1); >- else >- taken += elapsed(start, end);; >+ reply = ((float) random())/((float) RAND_MAX+1); >+ debug(logopt, >+ "nfs v2 random selection time: %f", reply); >+ } else { >+ reply = elapsed(start, end);; >+ debug(logopt, "nfs v2 rpc ping time: %f", reply); >+ } >+ taken += reply; > count++; > supported |= NFS2_SUPPORTED; > } >@@ -528,6 +550,9 @@ done_ver: > /* Allow for user bias */ > if (host->weight) > host->cost *= (host->weight + 1); >+ >+ debug(logopt, "host %s cost %ld weight %d", >+ host->name, host->cost, host->weight); > } > > return supported; >@@ -596,6 +621,9 @@ static int get_supported_ver_and_cost(un > time_t timeout = RPC_TIMEOUT; > int status; > >+ debug(logopt, >+ "called with host %s version 0x%x", 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)); >@@ -671,11 +699,14 @@ static int get_supported_ver_and_cost(un > status = rpc_ping_proto(&rpc_info); > gettimeofday(&end, &tz); > if (status) { >- if (random_selection) >+ if (random_selection) { > /* Random value between 0 and 1 */ > taken = ((float) random())/((float) RAND_MAX+1); >- else >+ debug(logopt, "random selection time %f", taken); >+ } else { > taken = elapsed(start, end); >+ debug(logopt, "rpc ping time %f", taken); >+ } > } > } > done: >@@ -695,6 +726,8 @@ done: > if (host->weight) > host->cost *= (host->weight + 1); > >+ debug(logopt, "cost %ld weight %d", host->cost, host->weight); >+ > return 1; > } > >@@ -801,18 +834,31 @@ int prune_host_list(unsigned logopt, str > 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(logopt, >+ "selected subset of hosts that support NFS4 over TCP"); >+ } else if (max_count == v3_tcp_count) { > selected_version = NFS3_TCP_SUPPORTED; >- else if (max_count == v2_tcp_count) >+ debug(logopt, >+ "selected subset of hosts that support NFS3 over TCP"); >+ } else if (max_count == v2_tcp_count) { > selected_version = NFS2_TCP_SUPPORTED; >- else if (max_count == v4_udp_count) >+ debug(logopt, >+ "selected subset of hosts that support NFS2 over TCP"); >+ } else if (max_count == v4_udp_count) { > selected_version = NFS4_UDP_SUPPORTED; >- else if (max_count == v3_udp_count) >+ debug(logopt, >+ "selected subset of hosts that support NFS4 over UDP"); >+ } else if (max_count == v3_udp_count) { > selected_version = NFS3_UDP_SUPPORTED; >- else if (max_count == v2_udp_count) >+ debug(logopt, >+ "selected subset of hosts that support NFS3 over UDP"); >+ } else if (max_count == v2_udp_count) { > selected_version = NFS2_UDP_SUPPORTED; >+ debug(logopt, >+ "selected subset of hosts that support NFS2 over UDP"); >+ } > > /* Add local and hosts with selected version to new list */ > this = *list;
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 252032
: 317031