httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: BalancerInherit, ProxyPassInherit: docs and code inconsistent
Date Fri, 14 Aug 2015 15:29:11 GMT
Let me check my notes on regarding the issue associated with
that implementation... as well as what the "correct" behavior
should be ;)

> On Aug 14, 2015, at 6:06 AM, Rainer Jung <rainer.jung@kippdata.de> wrote:
> 
> Docs say: "Disabling ProxyPassInherit also disables BalancerInherit."
> 
> Code (2.4) says:
> 
> if (ps->inherit || ps->ppinherit) {
>    ps->workers = apr_array_append(p, base->workers, overrides->workers);
>    ps->balancers = apr_array_append(p, base->balancers, overrides->balancers);
> }
> 
> and both inherit flags are set by default. So in order to disable worker inheritance,
you currently have to set both
> 
> ProxyPassInherit Off
> BalancerInherit Off
> 
> Only setting "BalancerInherit Off" or setting "ProxyPassInherit Off" doesn't turn inheritance
off.
> 
> I would have expected:
> 
> ProxyPassInherit Off => disables ProxyPass inheritance (works)
> BalancerInherit Off  => disables Balancer/Worker inheritance (does not work)
> 
> Any side effects from one to the other are IMHO questionable. There are cases where both
directions make sense but also where you don't want it. But we have documented the side effect
from ProxyPassInherit to BalancerInherit so probably should stick to it (although it had not
worked). I would prefer that one could overwrite "Disabling ProxyPassInherit also disables
BalancerInherit." by explicitly setting "BalancerInherit On".
> 
> That would mean changing code to
> 
> if (ps->inherit && (ps->ppinherit || ps->inherit_set)) {
>    ps->workers = apr_array_append(p, base->workers, overrides->workers);
>    ps->balancers = apr_array_append(p, base->balancers, overrides->balancers);
> }
> 
> so we inherit workers only if BalancerInherit is On and either ProxyPassInherit is On
or BalancerInherit was set to On explicitly.
> 
> Any comments? Otherwise I would go ahead and apply for trunk and propose for backport.
> 
> Regards,
> 
> Rainer


Mime
View raw message