* Add the forcerecovery balancer parameter that determines if recovery for
balancer workers without considering the retry value of workers is enforced.
There might be cases where an already overloaded backend can get into deeper
trouble if the recovery of all workers is enforced without considering the
retry parameter of each worker
Submitted by: rpluem
Reviewed by: rpluem, sf, rjung
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@
1373320 13f79535-47bb-0310-9956-
ffa450edef68
*) core: Fix building against PCRE 8.30 by switching from the obsolete
pcre_info() to pcre_fullinfo(). PR 52623 [Ruediger Pluem, Rainer Jung]
+ *) mod_proxy: Add the forcerecovery balancer parameter that determines if
+ recovery for balancer workers is enforced. [Ruediger Pluem]
+
Changes with Apache 2.2.22
*) SECURITY: CVE-2011-3368 (cve.mitre.org)
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_proxy: Add the forcerecovery balancer parameter that determines if
- recovery for balancer workers is enforced.
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=1306409&view=rev
- Backport version for 2.2.x of patch:
- http://people.apache.org/~rpluem/patches/forcerecovery_2.2.diff
- +1: rpluem, sf, rjung
- sf notes: The docs should get a compatibility note once it is clear
- in which 2.2.x version it gets introduced.
-
* mod_dumpio: Return an error code from a previous input filter
PR 52914
Trunk patch: http://svn.apache.org/viewvc?rev=1301111&view=rev
in the list. Worker recovery behaves the same as other worker errors.
Available with Apache HTTP Server 2.2.17 and later.
</td></tr>
+ <tr><td>forcerecovery</td>
+ <td>On</td>
+ <td>Force the immediate recovery of all workers without considering the
+ retry parameter of the workers if all workers of a balancer are
+ in error state. There might be cases where an already overloaded backend
+ can get into deeper trouble if the recovery of all workers is enforced
+ without considering the retry parameter of each worker. In this case
+ set to <code>Off</code>.
+ Available with Apache HTTP Server 2.2.23 and later.
+ </td></tr>
</table>
<p>A sample balancer setup</p>
* altered in 2.2.18. Add ap_unescape_url_keep2f_ex().
* 20051115.29 (2.2.21) add max_ranges to core_dir_config
* 20051115.30 (2.2.21) add ap_set_accept_ranges()
+ * 20051115.31 (2.2.23) Add forcerecovery to proxy_balancer_shared struct
*/
#define MODULE_MAGIC_COOKIE 0x41503232UL /* "AP22" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 30 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 31 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
}
}
+ else if (!strcasecmp(key, "forcerecovery")) {
+ if (!strcasecmp(val, "on"))
+ balancer->forcerecovery = 1;
+ else if (!strcasecmp(val, "off"))
+ balancer->forcerecovery = 0;
+ else
+ return "forcerecovery must be On|Off";
+ }
else {
return "unknown Balancer parameter";
}
int scolonsep; /* true if ';' seps sticky session paths */
apr_array_header_t *errstatuses; /* statuses to force members into error */
+ int forcerecovery; /* Force recovery if all workers are in error state */
};
struct proxy_balancer_method {
}
}
}
- if (!ok) {
+ if (!ok && balancer->forcerecovery) {
/* If all workers are in error state force the recovery.
*/
worker = (proxy_worker *)balancer->workers->elts;
(*balancer)->name = uri;
(*balancer)->lbmethod = lbmethod;
(*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker));
+
+ (*balancer)->forcerecovery = 1;
/* XXX Is this a right place to create mutex */
#if APR_HAS_THREADS
if (apr_thread_mutex_create(&((*balancer)->mutex),