]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: proxy: stop emitting logs for internal proxies when stopping
authorWilliam Lallemand <wlallemand@haproxy.org>
Sun, 14 May 2023 21:23:36 +0000 (23:23 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 15 May 2023 08:38:09 +0000 (10:38 +0200)
The HTTPCLIENT and the OCSP-UPDATE proxies are internal proxies, we
don't need to display logs of them stopping during the stopping of the
process.

This patch checks if a proxy has the flag PR_CAP_INT so it doesn't
display annoying messages.

src/proxy.c

index d2f10936652cf9447c324af1021feab2576caac7..b932c0c2bdf96098204b3660abebffd3c21ff608 100644 (file)
@@ -1989,11 +1989,11 @@ void proxy_cond_disable(struct proxy *p)
         * peers, etc) we must not report them at all as they're not really on
         * the data plane but on the control plane.
         */
-       if (p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP || p->mode == PR_MODE_SYSLOG)
+       if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP || p->mode == PR_MODE_SYSLOG) && !(p->cap & PR_CAP_INT))
                ha_warning("Proxy %s stopped (cumulated conns: FE: %lld, BE: %lld).\n",
                           p->id, p->fe_counters.cum_conn, p->be_counters.cum_conn);
 
-       if (p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP)
+       if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP) && !(p->cap & PR_CAP_INT))
                send_log(p, LOG_WARNING, "Proxy %s stopped (cumulated conns: FE: %lld, BE: %lld).\n",
                         p->id, p->fe_counters.cum_conn, p->be_counters.cum_conn);