You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rainer Jung <ra...@kippdata.de> on 2015/08/14 12:06:18 UTC
BalancerInherit, ProxyPassInherit: docs and code inconsistent
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
Re: BalancerInherit, ProxyPassInherit: docs and code inconsistent
Posted by Jim Jagielski <ji...@jaguNET.com>.
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 <ra...@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