From: Aurelien DARRAGON Date: Wed, 3 May 2023 08:36:54 +0000 (+0200) Subject: MINOR: server: fix message report when IDRAIN is set and MAINT is cleared X-Git-Tag: v2.8-dev10~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=977688bd57bb170cb8baafc2cc95dc578eb56584;p=thirdparty%2Fhaproxy.git MINOR: server: fix message report when IDRAIN is set and MAINT is cleared 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. --- diff --git a/src/server.c b/src/server.c index 46ee174958..8e02cb432d 100644 --- a/src/server.c +++ b/src/server.c @@ -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);