]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: fix health check regression causing them to depend on declaration...
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Dec 2013 10:11:34 +0000 (11:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Dec 2013 10:20:20 +0000 (11:20 +0100)
commit2f075e98fb9076d32e4fc433d366822752693638
treea928bc19c39f098480077b3359a866b525aedfed
parent9eba36b7267ed6a890af37f4e70934d62ec220a7
BUG/MEDIUM: checks: fix health check regression causing them to depend on declaration order

Since commit 4a74143 (MEDIUM: Paramatise functions over the check of a
server), the check type is inherited from the current proxy's check type
at the moment where the server is declared instead of when reviewing
server configs. This causes an issue where a health check is disabled
when the server is declared before the checks. In fact the server will
inherit the last known check type declared before the "server" line :

  backend foo
        # this server is not checked at all
        server s1 1.1.1.1:80 check
        option tcpchk
        # this server is tcp-checked :
        server s2 1.1.1.2:80 check
        option httpchk
        # this server is http-checked :
        server s3 1.1.1.3:80 check

The fix consists in assigning the check type during the config review
phase where the config is stable. No backport is nedeed.
src/cfgparse.c