diff options
author | William Lallemand <wlallemand@haproxy.org> | 2023-05-14 23:23:36 +0200 |
---|---|---|
committer | William Lallemand <wlallemand@haproxy.org> | 2023-05-15 10:38:09 +0200 |
commit | 7f954691634a794019e5f8720b8edb95f9f90258 (patch) | |
tree | 24b30be7115e47f2f38838bca5984e48301682bc | |
parent | 6eb53b138d9f190b0fa3ae4abfc292a9c7ca7cdd (diff) | |
download | haproxy-7f954691634a794019e5f8720b8edb95f9f90258.tar.gz |
MEDIUM: proxy: stop emitting logs for internal proxies when stopping
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.
-rw-r--r-- | src/proxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proxy.c b/src/proxy.c index d2f109366..b932c0c2b 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -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); |