From: Christopher Faulet Date: Mon, 24 Oct 2022 13:10:18 +0000 (+0200) Subject: BUG/MINOR: sink: Only use backend capability for the sink proxies X-Git-Tag: v2.7-dev9~136 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11a707ae52b28a8bd94cff734b088a5bddcc820c;p=thirdparty%2Fhaproxy.git BUG/MINOR: sink: Only use backend capability for the sink proxies When a ring section is parsed, a proxy is created. For now, it has the frontend (PR_CAP_FE) and the internal (PR_CAP_INT) capabilities, in addition to the expected backend capability (PR_CAP_BE). PR_CAP_INT capability was added to silent warning triggered because of PR_CAP_FE capability. Indeed, Because the proxy is declared as a frontend, warnings about missing bind lines and missing client timeout should be triggered during the configuration parsing. These warnings are inhibited because PR_CAP_INT capability is set. It is an issue on the 2.4 because PR_CAP_INT capability does not exist. So warnings are always emitted. But the true bug is that these proxies should not have PR_CAP_FE and PR_CAP_INT capabilities. Removing these capabilities is enough to remove any warnings on the 2.4, with no regression on higher versions. However, it may be a good idea to eval if a dedicated frontend for sinks should be added or not. This way, a true frontend would be used to start the sink applets. In addition, proxies capabilities/modes have to be reviewed to have a less ambiguous API. For instance a dedicate mode for sinks (PR_MODE_SINK ?) may be added. Finally, it could be very nice to have all proxies in the same list, including internal ones. This patch should fix the issue #1900. It must be backported as far as 2.4. --- diff --git a/src/sink.c b/src/sink.c index 23cffc6767..376f34bbd5 100644 --- a/src/sink.c +++ b/src/sink.c @@ -290,7 +290,7 @@ static int cli_parse_show_events(char **args, char *payload, struct appctx *appc void sink_setup_proxy(struct proxy *px) { px->last_change = now.tv_sec; - px->cap = PR_CAP_FE | PR_CAP_BE | PR_CAP_INT; + px->cap = PR_CAP_BE; px->maxconn = 0; px->conn_retries = 1; px->timeout.server = TICK_ETERNITY;