]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: server: fix message report when IDRAIN is set and MAINT is cleared
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 3 May 2023 08:36:54 +0000 (10:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 May 2023 14:28:32 +0000 (16:28 +0200)
Remaining in drain mode after removing one of server admins flags leads
to this message being generated:

"Server name/backend is leaving forced drain but remains in drain mode."

However this is not necessarily true: the server might just be leaving
MAINT with the IDRAIN flag set, so the report is incorrect in this case.
(FDRAIN was not set so it cannot be cleared)

To prevent confusion around this message and to comply with the code
comment above it: we remove the "leaving forced drain" precision to
make the report suitable for multiple transitions.

src/server.c

index 46ee174958c8962d6a4819251e1adbccbe8b854c..8e02cb432deb5be4863c87baa79aeed0566a6217 100644 (file)
@@ -5756,7 +5756,7 @@ static int _srv_update_status_adm(struct server *s, enum srv_adm_st_chg_cause ca
                        if (tmptrash) {
                                if (!(s->next_admin & SRV_ADMF_FDRAIN)) {
                                        chunk_printf(tmptrash,
-                                                    "%sServer %s/%s is leaving forced drain but remains in drain mode",
+                                                    "%sServer %s/%s remains in drain mode",
                                                     s->flags & SRV_F_BACKUP ? "Backup " : "",
                                                     s->proxy->id, s->id);