]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: checks: restore legacy on-error fastinter behavior
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 7 Dec 2022 11:17:24 +0000 (12:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Dec 2022 16:03:55 +0000 (17:03 +0100)
commit7d541a91ec6d51e3765d1776a6230f8d2a9b5e04
tree48df597edf0664069fc19966e23760e44a29345f
parente57b702e2bd6c0d3787c5996a89ec8513b5c4bc9
BUG/MINOR: checks: restore legacy on-error fastinter behavior

With previous commit, 9e080bf ("BUG/MINOR: checks: make sure fastinter is used
even on forced transitions"), on-error mark-down|sudden-death|fail-check are
now working as expected.

However, on-error fastinter remains broken because srv_getinter(), used in
the above commit to check the expiration date, won't return fastinter interval
if server health is maxed out (which is the case with on-error fastinter mode).

To fix this, we introduce a check flag named CHK_ST_FASTINTER.
This flag is set when on-error is triggered. This way we can force
srv_getinter() to return fastinter interval whenever the flag is set.
The flag is automatically cleared as soon as the new check task expiry is
recalculated in process_chk_conn().
This restores original behavior prior to d114f4a ("MEDIUM: checks: spread the
checks load over random threads").

It must be backported to 2.7 along with the aforementioned commits.
include/haproxy/check-t.h
src/check.c
src/server.c