]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker: ReloadFailed shown depending on failedreload
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 10 Nov 2021 09:57:18 +0000 (10:57 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 10 Nov 2021 14:53:01 +0000 (15:53 +0100)
The ReloadFailed prompt in the master CLI is shown only when
failedreloads > 0. It was previously using a check on the wait mode, but
we always use the wait mode now.

src/cli.c

index 36d11a4acb5bd29acb6de9d1e56dbe10f3a8417f..ec5283f27f5f7bc93a9cd4f2ff374f47cac77964 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -44,6 +44,7 @@
 #include <haproxy/list.h>
 #include <haproxy/listener.h>
 #include <haproxy/log.h>
+#include <haproxy/mworker.h>
 #include <haproxy/mworker-t.h>
 #include <haproxy/pattern-t.h>
 #include <haproxy/peers.h>
@@ -2067,7 +2068,7 @@ void pcli_write_prompt(struct stream *s)
        } else {
                if (s->pcli_next_pid == 0)
                        chunk_appendf(msg, "master%s> ",
-                                     (global.mode & MODE_MWORKER_WAIT) ? "[ReloadFailed]" : "");
+                                     (proc_self->failedreloads > 0) ? "[ReloadFailed]" : "");
                else
                        chunk_appendf(msg, "%d> ", s->pcli_next_pid);
        }