ASF Bugzilla – Attachment 27073 Details for
Bug 51247
Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mod_proxy_route_only_for_2_2_19
mod_proxy_route_only_for_2_2_19.patch (text/plain), 5.66 KB, created by
Keith Mashinter
on 2011-05-27 01:13:54 UTC
(
hide
)
Description:
mod_proxy_route_only_for_2_2_19
Filename:
MIME Type:
Creator:
Keith Mashinter
Created:
2011-05-27 01:13:54 UTC
Size:
5.66 KB
patch
obsolete
>Index: docs/manual/mod/mod_proxy.xml >=================================================================== >--- docs/manual/mod/mod_proxy.xml (revision 1125463) >+++ docs/manual/mod/mod_proxy.xml (working copy) >@@ -922,7 +922,8 @@ > <td>-</td> > <td>Single letter value defining the initial status of > this worker: 'D' is disabled, 'S' is stopped, 'I' is ignore-errors, >- 'H' is hot-standby and 'E' is in an error state. Status >+ 'H' is hot-standby, 'R' is route-only to only accept requests with >+ sticky session routes, and 'E' is in an error state. Status > can be set (which is the default) by prepending with '+' or > cleared by prepending with '-'. > Thus, a setting of 'S-E' sets this worker to Stopped and >Index: modules/proxy/mod_proxy.c >=================================================================== >--- modules/proxy/mod_proxy.c (revision 1125463) >+++ modules/proxy/mod_proxy.c (working copy) >@@ -238,6 +238,12 @@ > else > worker->status &= ~PROXY_WORKER_IGNORE_ERRORS; > } >+ else if (*v == 'R' || *v == 'r') { >+ if (mode) >+ worker->status |= PROXY_WORKER_ROUTE_ONLY; >+ else >+ worker->status &= ~PROXY_WORKER_ROUTE_ONLY; >+ } > else { > return "Unknown status parameter option"; > } >Index: modules/proxy/mod_proxy.h >=================================================================== >--- modules/proxy/mod_proxy.h (revision 1125463) >+++ modules/proxy/mod_proxy.h (working copy) >@@ -273,6 +273,7 @@ > #define PROXY_WORKER_STOPPED 0x0040 > #define PROXY_WORKER_IN_ERROR 0x0080 > #define PROXY_WORKER_HOT_STANDBY 0x0100 >+#define PROXY_WORKER_ROUTE_ONLY 0x0400 > > #define PROXY_WORKER_NOT_USABLE_BITMAP ( PROXY_WORKER_IN_SHUTDOWN | \ > PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR ) >@@ -288,6 +289,9 @@ > ( !( (f)->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) ) && \ > PROXY_WORKER_IS_INITIALIZED(f) ) > >+#define PROXY_WORKER_IS_ROUTE_ONLY(f) ( (f)->s && \ >+ ( (f)->s->status & PROXY_WORKER_ROUTE_ONLY ) ) >+ > /* default worker retry timeout in seconds */ > #define PROXY_WORKER_DEFAULT_RETRY 60 > #define PROXY_WORKER_MAX_ROUTE_SIZ 63 >Index: modules/proxy/mod_proxy_balancer.c >=================================================================== >--- modules/proxy/mod_proxy_balancer.c (revision 1125463) >+++ modules/proxy/mod_proxy_balancer.c (working copy) >@@ -776,6 +776,12 @@ > else if (!strcasecmp(val, "Enable")) > wsel->s->status &= ~PROXY_WORKER_DISABLED; > } >+ if ((val = apr_table_get(params, "rt"))) { >+ if (!strcasecmp(val, "Disable")) >+ wsel->s->status &= ~PROXY_WORKER_ROUTE_ONLY; >+ else if (!strcasecmp(val, "Enable")) >+ wsel->s->status |= PROXY_WORKER_ROUTE_ONLY; >+ } > if ((val = apr_table_get(params, "ls"))) { > int ival = atoi(val); > if (ival >= 0 && ival <= 99) { >@@ -873,6 +879,8 @@ > ap_rputs("Stop ", r); > if (worker->s->status & PROXY_WORKER_HOT_STANDBY) > ap_rputs("Stby ", r); >+ if (worker->s->status & PROXY_WORKER_ROUTE_ONLY) >+ ap_rputs("Rto ", r); > if (PROXY_WORKER_IS_USABLE(worker)) > ap_rputs("Ok", r); > if (!PROXY_WORKER_IS_INITIALIZED(worker)) >@@ -913,6 +921,13 @@ > ap_rputs("> | Enabled: <input name=\"dw\" value=\"Enable\" type=radio", r); > if (!(wsel->s->status & PROXY_WORKER_DISABLED)) > ap_rputs(" checked", r); >+ ap_rputs("\"></td></tr>\n", r); >+ ap_rputs("<tr><td>Route-Only:</td><td>Disabled: <input name=\"rt\" value=\"Disable\" type=radio", r); >+ if (!(wsel->s->status & PROXY_WORKER_ROUTE_ONLY)) >+ ap_rputs(" checked", r); >+ ap_rputs("> | Enabled: <input name=\"rt\" value=\"Enable\" type=radio", r); >+ if (wsel->s->status & PROXY_WORKER_ROUTE_ONLY) >+ 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); >@@ -1027,6 +1042,8 @@ > continue; > if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) > continue; >+ if (PROXY_WORKER_IS_ROUTE_ONLY(worker)) >+ continue; > /* If the worker is in error state run > * retry on that worker. It will be marked as > * operational if the retry timeout is elapsed. >@@ -1109,6 +1126,8 @@ > continue; > if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) > continue; >+ if (PROXY_WORKER_IS_ROUTE_ONLY(worker)) >+ continue; > /* If the worker is in error state run > * retry on that worker. It will be marked as > * operational if the retry timeout is elapsed. >@@ -1181,6 +1200,9 @@ > if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) > continue; > >+ if (PROXY_WORKER_IS_ROUTE_ONLY(worker)) >+ continue; >+ > /* If the worker is in error state run > * retry on that worker. It will be marked as > * operational if the retry timeout is elapsed.
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 51247
:
27047
|
27060
|
27061
| 27073 |
27542
|
27585
|
28765
|
28769