]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: check: Always increment check health counter on CONPASS
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 20 Nov 2020 17:13:02 +0000 (18:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Nov 2020 09:30:23 +0000 (10:30 +0100)
Regarding the health counter, a check finished with the CONDPASS result is
now the same than with the PASSED result: The health counter is always
incemented. Before, it was only performed is the health counter was not 0.

There is no change for the disable-on-404 option because it is only
evaluated for running or stopping servers. So with an health check counter
greater than 0. But it will make possible to handle (STOPPED -> STOPPING)
transition for servers.

src/check.c

index bedcff195170caeea50c1969105a7b6fae248898..edcaf327c820780e52aa8bb24857348513ca619d 100644 (file)
@@ -269,9 +269,8 @@ void set_server_check_status(struct check *check, short status, const char *desc
                break;
 
        case CHK_RES_PASSED:
-       case CHK_RES_CONDPASS:  /* "condpass" cannot make the first step but it OK after a "passed" */
-               if ((check->health < check->rise + check->fall - 1) &&
-                   (check->result == CHK_RES_PASSED || check->health > 0)) {
+       case CHK_RES_CONDPASS:
+               if (check->health < check->rise + check->fall - 1) {
                        report = 1;
                        check->health++;