Commit Graph

260 Commits

Author SHA1 Message Date
57a654ffe7 Instead of just enabling/disabling, we can now adjust
more useful worker status bits, such as whether hot stby, etc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066482 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 14:39:48 +00:00
f2c6805bc9 Again, abstract out the worker status magic to it's handled
by funcs...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066138 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 19:07:02 +00:00
3866ae89a4 We can now change lbmethod at runtime.
Provide a stub for other balancer-related params to
be adjusted as well, like timeout, sticky, etc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066076 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 16:00:01 +00:00
177e4e5f86 Move the lbmethod to also allow it to be adjusted runtime
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065750 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:29:01 +00:00
12ae415dbe Move some "nice to be able to change" balancer stuff to shm
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065748 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:52 +00:00
334ae2f5a2 Make it clear that '_' is a possible char and accepted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060802 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 13:08:08 +00:00
a713db09d4 Make the balancer shared memory slot more human readable. But we need
to make it a "safe" filename, so create 2 funcs which do that.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060657 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 02:41:49 +00:00
1a1c15a417 Align proxy_worker_shared in slotmem shm
using default APR alignment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060112 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:16:51 +00:00
5e981d902a mod_slotmem_shm is a predecessor of
mod_proxy_balancer, not mod_proxy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060109 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:09:18 +00:00
283b511ebd Display number of members possible per balancer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058795 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 23:25:48 +00:00
a541e41dab And check the nonce, taking care to ensure that the
form actually specified a balancer.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058630 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:25 +00:00
31c4a9e21e Move nonce to balancer struct and add logic for nonce and growth.
Adjust mmn and update doccos

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058629 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:22 +00:00
ddebc67a4e whitespace
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058626 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:10 +00:00
fab3678ad3 Builds and passes tests as prefork... good save state
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058625 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:05 +00:00
9096c04779 Adjust for conf->workers being *proxy_worker and balancer->workers being **proxy_worker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058624 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:02 +00:00
201bbd1ba9 More movement to shared stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00
daa5a5c57c OK... a good commit point (we don't quite compile yet though...)
Pull out the worker scoreboard cruft and start moving most
worker stuff to shm. Use slotmem for workers and provide
space for growth.

Redo logic:

  ap_proxy_define_*
  ap_proxy_create_*
  ap_proxy_initialize_*

Right now just for workers, but lay framework for balancers
as well. The idea is to break out the functional parts
to make it easy for dynamics. Defining is simply describing
the worker, and tucking that info away. When we create, we
go ahead and create the shared memory, etc... Initialize
is simply to allow child process to access the shm...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:50 +00:00
5febbb22aa Use branch now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058621 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:45 +00:00
a280069b3c a pointer optim.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031798 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 21:17:05 +00:00
1ba4520701 Avoid unnecessariy initialisation before we test handler name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024449 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 22:48:38 +00:00
5a222cf2cf mod_proxy: Rename erroronstatus to failonstatus...
... by popular demand, and add documentation.

Submitted by: Daniel Ruggeri <DRuggeri primary.net>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987359 13f79535-47bb-0310-9956-ffa450edef68
2010-08-20 00:54:34 +00:00
c55a15fc2f Fold in some stuff to allow for matching of workers
to their actual scoreboard slots, independent of slot
ID.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@984188 13f79535-47bb-0310-9956-ffa450edef68
2010-08-10 19:46:58 +00:00
7b3189cb8d remove more useless use of strlen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982046 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 22:06:24 +00:00
e6fcd04001 follow up to r930125
change log message when forcing worker into error state:
* APLOG_ERR instead of unsuppressible APLOG_NOTICE
* follow formatting of existing proxy messages more closely


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@962972 13f79535-47bb-0310-9956-ffa450edef68
2010-07-11 02:54:30 +00:00
01b9f2e551 - Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
- Add some trace logging to core and http


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951900 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:07:12 +00:00
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
84f9080445 Move back to a post_config hook...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@936880 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 14:52:43 +00:00
4c4b534813 Add updatelbstatus to allow to have all the LB logic in the balancers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@936828 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 13:13:40 +00:00
d9fcb8daf1 Add in BalancerNonce directive... useful for shared-secrets.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@936407 13f79535-47bb-0310-9956-ffa450edef68
2010-04-21 18:19:06 +00:00
6f4c170986 small style tweaks to r930125
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930254 13f79535-47bb-0310-9956-ffa450edef68
2010-04-02 12:19:22 +00:00
9c1c3f56d4 Proxy balancer: support setting error status according to
HTTP response code from a backend.
PR 48939 [Daniel Ruggeri <DRuggeri primary.net>]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930125 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 22:48:38 +00:00
730a42e334 Fix crash in balancer-manager.
This was due to an incomplete refactoring in
r771940 (switching balancer->workers to an
array of pointers).

It's likely that other balancer functionality
was broken too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@891230 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 13:24:51 +00:00
85a6ee67c6 In the case where we have no members, they aren't in error
states :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795954 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20 18:53:08 +00:00
591bb63111 unused var
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774774 13f79535-47bb-0310-9956-ffa450edef68
2009-05-14 14:13:52 +00:00
ceeb8b0403 standard method
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774428 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 16:56:12 +00:00
48ae3d9efa Allow the load balancing method to "create" workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774400 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 15:27:05 +00:00
a970341df7 Arrange the proxy_balancer_method:
- Put context back after the finder().
- Use  server_rec as second parameter for reset() and age().
- Add the call for reset().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@773929 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 15:10:56 +00:00
39c14c3bec update comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772279 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06 14:32:46 +00:00
a29e9ec1d5 Change the order of mod_proxy and mod_proxy_balancer child_init().
Change the balancer workers area to the address of workers instead copying the workers.
Arrange lbmethod accordingly.
Move the creation of conf->forward worker to mod_proxy child_init().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771940 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 17:15:48 +00:00
a3c2a975c9 * Try first if we find any "recoverable" workers before we force them to
recover.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@734710 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15 13:59:11 +00:00
653ac709cc All lbmethods are now ind submodules...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722952 13f79535-47bb-0310-9956-ffa450edef68
2008-12-03 16:08:26 +00:00
45c5291a7f Allow determination of whether to use ';' as
a sticky session path delim/sep (ala mod_jk) to
be runtime (and balancer-wise) configurable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687754 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 13:33:32 +00:00
383a1d2cd1 Add in additional logging and use correct formats
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687099 13f79535-47bb-0310-9956-ffa450edef68
2008-08-19 17:28:00 +00:00
5d8e4bba70 Remove trailing path element, ala ./jk/native/common/jk_lb_worker.c,
but use apr_strtok niceness. PR: 45158


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686809 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 16:10:41 +00:00
1a0a3b549c Add in bybusyness LB method, via Joel Gluth in
https://issues.apache.org/bugzilla/show_bug.cgi?id=45501

NOTE: Name changed and added in to ease enhancement/bugfixes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686805 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 15:59:48 +00:00
fef506ed1a * Move nonce field inside the html form.
PR: 45578


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@683373 13f79535-47bb-0310-9956-ffa450edef68
2008-08-06 19:02:34 +00:00
ce75fb285c No functional change; simplify the CVE-2007-6420 fix slightly, as
suggested by rpluem:

* modules/proxy/mod_proxy_balancer.c (balancer_init): Serialize the
  UUID to a string here...
  (balancer_handler): ...rather than here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@663967 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 14:44:35 +00:00
4a375eff22 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661666 13f79535-47bb-0310-9956-ffa450edef68
2008-05-30 11:49:31 +00:00
6e450bc660 * Set at init time and combine comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661459 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 20:12:58 +00:00
c3242b9c5c * Do not add the query string again in the case that we are using the
unparsed uri.

PR: 44803


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661452 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 19:53:30 +00:00