Re: [PATCH] mod_proxy run cleanup on balancer failure
Brian Akins wrote:
> Can we get a vote on this? Jim gave it +1. So do I. I would like this
> to be in a beta "release." This fix is important to our environment.
Never mind. See this in trunk...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Here is a trivial patch that will allow proxy_handler to run the request_status hook if pre_request fails. This is necessary if all balncer members are in an...
Brian Akins
bakins@...
Sep 28, 2005 2:29 pm
... If all workers are in error state, worker will be NULL. Are you sure that the post_request hook that is run in the balancer case is prepared for such a...
r.pluem@...
Sep 28, 2005 9:09 pm
... Hmmm... It might be best to, in ap_proxy_pre_request() set *balancer to NULL if the result from proxy_run_pre_request() isn't OK. Then we can call jump to...
Jim Jagielski
jim@...
Sep 29, 2005 12:59 pm
... [..cut..] ... Yes, this sounds like the better solution here. ... Yes, I think you are right. It should be *balancer. Regards Rüdiger...
r.pluem@...
Sep 29, 2005 1:10 pm
... goto cleanup; will actually run the request_status optional hook, so the patch makes sense, although I would make it as follows: if (access_status != OK) {...
Mladen Turk
mturk@...
Sep 29, 2005 7:26 am
... I guess that makes sense. I just want to chatch the following cases: No available workers - all in error or busy worker failed - ie connect timeout random...
Brian Akins
brian.akins@...
Sep 29, 2005 1:41 pm
... The rub, as mentioned, is to ensure that when jumping to cleanup, balancer is never non-NULL with a NULL worker, so we need to check if that ever happens....
Jim Jagielski
jim@...
Sep 29, 2005 2:49 pm
... What about the following patch? I think it should address all the things discussed. Regards Rüdiger Index: mod_proxy.c ... +++ mod_proxy.c (Arbeitskopie) ...
r.pluem@...
Sep 29, 2005 4:01 pm
Except for the formatting +1 :)...
Jim Jagielski
jim@...
Sep 29, 2005 4:43 pm
As I try to improve my Apache code style awareness. What is wrong with the formatting? Regards Rüdiger...
r.pluem@...
Sep 29, 2005 6:33 pm
Sorry :) The single line if statements. The pref is if (foo) banana(); rather than if (foo) banana();...
Jim Jagielski
jim@...
Sep 29, 2005 6:50 pm
... Thanks. So I guess this should be fine: Index: mod_proxy.c ... +++ mod_proxy.c (Arbeitskopie) @@ -679,8 +679,22 @@ char *url = uri; /* Try to obtain the...
r.pluem@...
Sep 29, 2005 7:49 pm
Can we get a vote on this? Jim gave it +1. So do I. I would like this to be in a beta "release." This fix is important to our environment. ... -- Brian...
Brian Akins
bakins@...
Oct 28, 2005 1:45 pm
... Never mind. See this in trunk... -- Brian Akins Lead Systems Engineer CNN Internet Technologies...
Brian Akins
brian.akins@...
Oct 28, 2005 1:47 pm
... It is also backported to 2.2.x. So it will be part of 2.1.9 Regards Rüdiger...
Ruediger Pluem
rpluem@...
Oct 28, 2005 5:14 pm
... http://httpd.apache.org/dev/styleguide.html The basic objection to your patch would be that statements after your if's; put them on the next line. HTH, ...
Sander Striker
s.striker@...
Sep 29, 2005 7:32 pm
... This means if access_status is DECLINED, we would return. Would that work for you??...
Jim Jagielski
jim@...
Sep 29, 2005 4:31 pm
... Yes. Just need to run request_status in case of error. -- Brian Akins Lead Systems Engineer CNN Internet Technologies...