MINOR: stats: shows proxy in a stopped state

Previous patch b5c0d65 ("MINOR: proxy: disabled takes a stopping and a
disabled state") allows us to set 2 states for a stopped or a disabled
proxy. With this patch we are now able to show the stats of all proxies
when the process is in a stopping states, not only when there is some
activity on a proxy.

This patch should fix issue #1307.
This commit is contained in:
William Lallemand 2021-08-03 13:18:11 +02:00
parent 8e765b86fd
commit 85a16b2ba2

View File

@ -3617,10 +3617,10 @@ static int stats_dump_proxies(struct stream_interface *si,
px = appctx->ctx.stats.obj1;
/* Skip the global frontend proxies and non-networked ones.
* Also skip disabled proxies unless they are still holding active sessions.
* Also skip proxies that were disabled in the configuration
* This change allows retrieving stats from "old" proxies after a reload.
*/
if ((!px->disabled || px->served > 0) && px->uuid > 0 &&
if (!(px->disabled & PR_DISABLED) && px->uuid > 0 &&
(px->cap & (PR_CAP_FE | PR_CAP_BE)) && !(px->cap & PR_CAP_INT)) {
if (stats_dump_proxy_to_buffer(si, htx, px, uri) == 0)
return 0;