]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxy: report a warning for max_ka_queue in proxy_cfg_ensure_no_http()
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 19 Sep 2023 16:48:23 +0000 (18:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:30 +0000 (15:34 +0200)
Display a warning when max_ka_queue is set (it is the case when
"max-keep-alive-queue" directive is used within a proxy section) to inform
the user that this directives depends on the "http" mode to work and thus
will safely be ignored.

src/proxy.c

index f8bb876a08f13781dfdaf07d30ed1972bb0e54d4..80b64f3bdac9cd1137a473136aeccf882443a01b 100644 (file)
@@ -1294,6 +1294,10 @@ struct server *findserver_unique_name(const struct proxy *px, const char *name,
  */
 int proxy_cfg_ensure_no_http(struct proxy *curproxy)
 {
+       if (curproxy->max_ka_queue) {
+               ha_warning("max_ka_queue will be ignored for %s '%s' (needs 'mode http').\n",
+                          proxy_type_str(curproxy), curproxy->id);
+       }
        if (curproxy->cookie_name != NULL) {
                ha_warning("cookie will be ignored for %s '%s' (needs 'mode http').\n",
                           proxy_type_str(curproxy), curproxy->id);