ASF Bugzilla – Attachment 22820 Details for
Bug 46140
Change error state in balancer manager
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
It enables changing error state of workers
change-error-state.patch (text/plain), 4.02 KB, created by
Tomokazu Harada
on 2008-11-03 05:25:45 UTC
(
hide
)
Description:
It enables changing error state of workers
Filename:
MIME Type:
Creator:
Tomokazu Harada
Created:
2008-11-03 05:25:45 UTC
Size:
4.02 KB
patch
obsolete
>--- modules/proxy/mod_proxy_balancer.c 2008-10-26 21:49:20.000000000 +0900 >+++ modules/proxy/mod_proxy_balancer.c 2008-10-26 23:49:20.000000000 +0900 >@@ -760,6 +760,13 @@ > else if (!strcasecmp(val, "Enable")) > wsel->s->status &= ~PROXY_WORKER_DISABLED; > } >+ if ((val = apr_table_get(params, "ew"))) { >+ if (!strcasecmp(val, "Error") && !(wsel->s->status & PROXY_WORKER_IN_ERROR)) { >+ wsel->s->error_time = apr_time_now(); >+ wsel->s->status |= PROXY_WORKER_IN_ERROR; >+ } else if (!strcasecmp(val, "Ok") && (wsel->s->status & PROXY_WORKER_IN_ERROR)) >+ wsel->s->status &= ~PROXY_WORKER_IN_ERROR; >+ } > if ((val = apr_table_get(params, "ls"))) { > int ival = atoi(val); > if (ival >= 0 && ival <= 99) { >@@ -810,9 +817,9 @@ > balancer = (proxy_balancer *)conf->balancers->elts; > for (i = 0; i < conf->balancers->nelts; i++) { > >- ap_rputs("<hr />\n<h3>LoadBalancer Status for ", r); >+ ap_rputs("<hr>\n<h3>LoadBalancer Status for ", r); > ap_rvputs(r, balancer->name, "</h3>\n\n", NULL); >- ap_rputs("\n\n<table border=\"0\" style=\"text-align: left;\"><tr>" >+ ap_rputs("\n\n<table border=\"0\"><tr align=\"left\">" > "<th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>" > "</tr>\n<tr>", r); > if (balancer->sticky) { >@@ -832,8 +839,8 @@ > ap_rprintf(r, "<td>%d</td>\n", balancer->max_attempts); > ap_rprintf(r, "<td>%s</td>\n", > balancer->lbmethod->name); >- ap_rputs("</table>\n<br />", r); >- ap_rputs("\n\n<table border=\"0\" style=\"text-align: left;\"><tr>" >+ ap_rputs("</tr></table>\n<br>", r); >+ ap_rputs("\n\n<table border=\"0\"><tr align=\"left\">" > "<th>Worker URL</th>" > "<th>Route</th><th>RouteRedir</th>" > "<th>Factor</th><th>Set</th><th>Status</th>" >@@ -879,12 +886,12 @@ > ap_rputs("</table>\n", r); > ++balancer; > } >- ap_rputs("<hr />\n", r); >+ ap_rputs("<hr>\n", r); > if (wsel && bsel) { > ap_rputs("<h3>Edit worker settings for ", r); >- ap_rvputs(r, wsel->name, "</h3>\n", NULL); >+ ap_rvputs(r, wsel->name, " ( ", bsel->name, " )</h3>\n", NULL); > ap_rvputs(r, "<form method=\"GET\" action=\"", NULL); >- ap_rvputs(r, r->uri, "\">\n<dl>", NULL); >+ ap_rvputs(r, r->uri, "\">\n", NULL); > ap_rputs("<table><tr><td>Load factor:</td><td><input name=\"lf\" type=text ", r); > ap_rprintf(r, "value=\"%d\"></td></tr>\n", wsel->s->lbfactor); > ap_rputs("<tr><td>LB Set:</td><td><input name=\"ls\" type=text ", r); >@@ -904,6 +911,13 @@ > if (!(wsel->s->status & PROXY_WORKER_DISABLED)) > ap_rputs(" checked", r); > ap_rputs("></td></tr>\n", r); >+ ap_rputs("<tr><td>Error Status:</td><td>Error: <input name=\"ew\" value=\"Error\" type=radio", r); >+ if (wsel->s->status & PROXY_WORKER_IN_ERROR) >+ ap_rputs(" checked", r); >+ ap_rputs("> | Ok: <input name=\"ew\" value=\"Ok\" type=radio", r); >+ if (!(wsel->s->status & PROXY_WORKER_IN_ERROR)) >+ ap_rputs(" checked", r); >+ ap_rputs("></td></tr>\n", r); > ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n", r); > ap_rvputs(r, "</table>\n<input type=hidden name=\"w\" ", NULL); > ap_rvputs(r, "value=\"", ap_escape_uri(r->pool, wsel->name), "\">\n", NULL); >@@ -913,7 +927,7 @@ > ap_rvputs(r, "<input type=hidden name=\"nonce\" value=\"", > balancer_nonce, "\">\n", NULL); > ap_rvputs(r, "</form>\n", NULL); >- ap_rputs("<hr />\n", r); >+ ap_rputs("<hr>\n", r); > } > ap_rputs(ap_psignature("",r), r); > ap_rputs("</body></html>\n", r);
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 46140
: 22820