When an SPOE agent uses a backend declared in "mode tcp", the backend is
automatically converted to "mode spop" during configuration validation.
The conversion is done in spoe_check(), which is called from flt_check(),
i.e. after proxy_finalize() has already normalized the mode-dependent
options of that backend. Seeing the backend was still in TCP mode at the
time, its http-reuse policy was stripped down to "never", while explicit
"mode spop" backends are unconditionally forced to "always".
Fix this by forcing PR_O_REUSE_ALWS (after clearing the reuse bits) when
the backend is converted to SPOP mode, which is exactly the policy an
explicit "mode spop" backend ends up with in proxy_finalize().
This patch should fix the issue #3611. It should to be backported as far as
3.2.
return 1;
}
if (target->mode == PR_MODE_TCP) {
- /* Convert legacy SPOP backend by added the right mode */
+ /* Convert legacy SPOP backend by setting the right mode and features */
target->mode = PR_MODE_SPOP;
+ target->options &= ~PR_O_REUSE_MASK;
+ target->options |= PR_O_REUSE_ALWS;
}
if (target->mode != PR_MODE_SPOP) {
ha_alert("Proxy %s : backend '%s' used by SPOE agent '%s' declared"