From: Aurelien DARRAGON Date: Fri, 6 Dec 2024 11:04:11 +0000 (+0100) Subject: DOC: config: fix confusing init-state examples X-Git-Tag: v3.2-dev1~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7934eef25d1207392a1b4a915d21889babfb1fb0;p=thirdparty%2Fhaproxy.git DOC: config: fix confusing init-state examples in 50322dff ("MEDIUM: server: add init-state"), some examples on how to use init-state server keyword were added alongside with the keyword documentation. However, as reported by Nick Ramirez, there was an error because the example that stated that haproxy will pass the traffic to the server after 3 successful health checks used the "init-state down" instead of the "init-state fully-down". Thus the behavior wouldn't match what the comment said (only 1 successful health check was required). Here we fix the example in itself to match with the comment. Also the following example ("# or") was also affected, but it is kind of redundant as the main purpose of the examples are to illustrate the feature in itself and not how to use server-template directive, so we remove it. This should be backported in 3.1 with 50322dff --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 684a7a80e5..aab1898f74 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -18143,13 +18143,8 @@ init-state { fully-up | up | down | fully-down } # pass traffic to the server only after 3 successful health checks backend google-backend mode http - server srv1 google.com:80 check init-state down rise 3 - server srv2 google.com:80 check init-state down rise 3 - - # or - listen - mode http - server-template srv 2 google.com:80 check init-state down rise 3 + server srv1 google.com:80 check init-state fully-down rise 3 + server srv2 google.com:80 check init-state fully-down rise 3 See also: "option tcp-check", "option httpchk"