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

Reply via email to