Add force recovery for balancer.
In case all balancer members were in error state 503
was returned until the recovery timeout expired.
The patch forces recovery in case all balancer members
are in error state regardless of recovery timeout
directive.
This fixes the time gap when 503 was returned and
backend was already up and running.
Submitted by: mturk
Reviewed by: jim, rpluem, jfclere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@714270 13f79535-47bb-0310-9956-ffa450edef68
Make mod_proxy_ajp aware of the nocanon envvar
handle ? in cases where nocanon is in effect
* Do not add the query string again in the case that we are using the
unparsed uri.
PR: 44803
Set at init time, and combine comments
Typo.
* Do not add the query string again in the case that we are using the
unparsed uri.
PR: 44803
* Set at init time and combine comments.
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@663593 13f79535-47bb-0310-9956-ffa450edef68
Prevent CSRF attacks against the balancer-manager (CVE-2007-6420)
* modules/proxy/mod_proxy_balancer.c (balancer_init): New function.
(balancer_handler): Place a nonce in the form output, and check that
the submitted form data includes that nonce.
(ap_proxy_balancer_register_hook): Register the new post_config hook.
Submitted by: jorton
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@663514 13f79535-47bb-0310-9956-ffa450edef68
* Correctly escape the worker route and the worker redirect string in the HTML
output of the balancer manager.
Reported by SecurityReason.
Submitted by: rpluem
Reviewed by: rpluem, niq, wrowe
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@608061 13f79535-47bb-0310-9956-ffa450edef68
Be proactively safe. A cheap check, but helps prevents badness :)
* Do not reset lbstatus, lbfactor and lbset if the shared proxy_worker_stat
structure for a worker is already initialized by the same or another
process.
* This check is now part of the PROXY_WORKER_IS_INITIALIZED macro.
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@575708 13f79535-47bb-0310-9956-ffa450edef68
* Isolate the unlock return vals
* Log when the lock fails.
* Failure to unlock is very nasty, so log it to help with troubleshooting.
Submitted by: jim
Reviewed by: jim, rpluem, wrowe
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@488822 13f79535-47bb-0310-9956-ffa450edef68
* Add the following environment variables to expose the information
* about
the route, the sticky session and the worker used during a request to
other modules:
BALANCER_SESSION_STICKY
BALANCER_SESSION_ROUTE
BALANCER_NAME
BALANCER_WORKER_NAME
BALANCER_WORKER_ROUTE
PR: 39806
Submitted by: Brian <brectanu gmail.com>
Reviewed by: rpluem
fix validation error
* Set the new environment variable BALANCER_ROUTE_CHANGED if a worker with a
route different from the one supplied by the client had been chosen or if
the client supplied no routing information for a balancer with sticky
sessions.
* mod_proxy_balancer: Document BALANCER_ROUTE_CHANGED environment variable.
Submitted by: Brian Rectanus <brectanu gmail.com>
Reviewed by: rpluem
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@472114 13f79535-47bb-0310-9956-ffa450edef68
* Extract stickysession information correctly in the case that it is given
as parameter like in the following example:
www.someplace.com/somewhere/?jsessionid=gggfgdufdfoef.server¶meter=value
So far we were only able to handle stickysession information encoded in the
following form:
www.someplace.com/somewhere/;jsessionid=gggfgdufdfoef.server?parameter=value
PR: 40400
Submitted by: rpluem
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@472100 13f79535-47bb-0310-9956-ffa450edef68
*) The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive. ap_get_server_version() is now
deprecated, and is replaced by ap_get_server_banner() and
ap_get_server_description().
Reviewed by: rpluem, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@446606 13f79535-47bb-0310-9956-ffa450edef68
Add in a very simple balancer "set" concept, which allows
for members to be assigned to a particular cluster set
such that members in lower-numbered sets are checked/used
before those in higher ones.
Also bundled in this are some HTML cleanups for the balancer
manager UI. Sorry for the mixins :)
Compiles/builds clean: passes test framework as well
as more normal usage tests ;)
Reviewed by: jim
Merge r427368, r428352, r428361, r432352 from trunk:
Reset standby flags for each loop through the cluster sets
Initialization change. Move to a different format
to force resets as well as a common technique, in case
_route is updated at some point.
Update docs for proxy:
1. Put params in abc order
2. Add hot-standby example
3. Add in new features that hadn't been documented yet (lbset, ...)
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@440800 13f79535-47bb-0310-9956-ffa450edef68
Restructure the find_route_worker() function. Basically,
it should take care of knowing about usable and unusable
workers. By centralizing this logic, it will make it
easier and more streamlined to add in the forthcoming
hot-standby status workers.
Clean up some proxy macros. Avoid the use of magic
numbers, and instead use pre-defined defines. Also,
ensure that usable workers have been initialized :)
Allocate a bit for hot standbys. Adjust so that
normal "usable" workers don't count these.
Add in hot-standby balancer member. If all other members
are disabled or not-usable, ONLY THEN will the hot
standby's be used.
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@438563 13f79535-47bb-0310-9956-ffa450edef68
* Retry worker chosen by client supplied route / redirect worker if it
is in error state before sending "Service Temporarily Unavailable".
PR: 38962
Submitted by: Christian Boitel <cboitel lfdj.com>
Reviewed by: rpluem
Submitted by: rpluem
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@437745 13f79535-47bb-0310-9956-ffa450edef68
* Do not overwrite the status of initialized workers and respect the configured
status of uninitilized workers when creating a new child process.
Submitted by: rpluem
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@390182 13f79535-47bb-0310-9956-ffa450edef68
* Fix a declaration problem introduced in r195013 that is C99 but not ANSI C
compatible. Thus move declaration of *worker to the top of find_session_route
to make it ANSI C compatible again.
Submitted by: NormW <normw bocnet.com.au>
Reviewed by: Ruediger Pluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@307393 13f79535-47bb-0310-9956-ffa450edef68
r279973
r279752
r279579
r279319
r279305
------------------------------------------------------------------------
r279973 | jorton | 2005-09-10 05:10:27 -0400 (Sat, 10 Sep 2005) | 5 lines
* modules/proxy/mod_proxy_balancer.c (balancer_handler): Fix gcc
warning; no functional change.
* modules/proxy/mod_proxy.c (set_balancer_param): Likewise.
------------------------------------------------------------------------
r279752 | jim | 2005-09-09 08:28:02 -0400 (Fri, 09 Sep 2005) | 4 lines
Proxy balancer lbmethods are now registered as providers and not
via hooks. Move various find() functions back to mod_proxy_balancer
where they belong :)
------------------------------------------------------------------------
r279579 | bnicholes | 2005-09-08 12:37:00 -0400 (Thu, 08 Sep 2005) | 1 line
Remove proxy_hook_load_lbmethods from Netware export list
------------------------------------------------------------------------
r279319 | jim | 2005-09-07 09:14:16 -0400 (Wed, 07 Sep 2005) | 2 lines
Minor nit. Methods are server-wide, so simply use the base version table.
------------------------------------------------------------------------
r279305 | jim | 2005-09-07 08:04:15 -0400 (Wed, 07 Sep 2005) | 4 lines
Restruct of lbmethod find-best algo's, bypassing hook mechanism.
Looking into provider method, but until then... Prevent core dump
when balancer not in vhosts
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@290141 13f79535-47bb-0310-9956-ffa450edef68
Revert the hack for setting the lbmethod.
The problem is deeper inside caused by the
new hook to the balancer module that is never
called on WIN32.
Although the hack fixed core dump, the proxy is
still unusable because the configuration is failing
due to the empty lbmethod names array.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@233516 13f79535-47bb-0310-9956-ffa450edef68
The problem is deeper inside caused by the
new hook to the balancer module that is never
called on WIN32.
Although the hack fixed core dump, the proxy is
still unusable because the configuration is failing
due to the empty lbmethod names array.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@233514 13f79535-47bb-0310-9956-ffa450edef68
a member, then clicked on another member and/or
itself again, the member would be re-enabled. This
was due to the form being "submitted" and
'dw' being null (observed with Safari). Anyway,
moving to a radio makes it explicit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232314 13f79535-47bb-0310-9956-ffa450edef68
without requiring code changes to mod_proxy/mod_proxy_balancer;
these can be implemented via sub-modules now.
Let the games begin...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232282 13f79535-47bb-0310-9956-ffa450edef68
another valid variable-may-be-used-uninitialized warning from GCC 4
(in the !balancer->sticky case, find_session_route returns NULL
without setting route).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@193117 13f79535-47bb-0310-9956-ffa450edef68