From: Christopher Faulet Date: Wed, 31 May 2023 09:55:23 +0000 (+0200) Subject: DOC: config: Fix bind/server/peer documentation in the peers section X-Git-Tag: v2.8.0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76a98b49053e3e3a177f04b21699807fabf403cb;p=thirdparty%2Fhaproxy.git DOC: config: Fix bind/server/peer documentation in the peers section Documentation about bind and server directives in the peers section was retrieved from the proxy part but there are some limitations, especially for the bind directive. And the same is true for the peer directive. It is forbidden to have several listening addresses. Multiple addresses or port range are not allowed. Here, only the documentation is fixed. The configuration parsing will be improved later to trigger errors on bad uses. In addition, it is also specified that unix socket are supported. This patch partially fixes the issue #2066. It should be backported to all stable versions. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 367616cb11..6794c6748b 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -3732,7 +3732,8 @@ peers Creates a new peer list with name . It is an independent section, which is referenced by one or more stick-tables. -bind [
]: [, ...] [param*] +bind [
]:port [param*] +bind / [param*] Defines the binding parameters of the local peer of this "peers" section. Such lines are not supported with "peer" line in the same "peers" section. @@ -3767,16 +3768,17 @@ log
[len ] [format ] [sample :] log information about the "peers" listener. See "log" option for proxies for more details. -peer : [param*] +peer [
]:port [param*] +peer / [param*] Defines a peer inside a peers section. If is set to the local peer name (by default hostname, or forced using "-L" command line option or "localpeer" global configuration setting), - HAProxy will listen for incoming remote peer connection on :. - Otherwise, : defines where to connect to in order to join the - remote peer, and is used at the protocol level to identify and + HAProxy will listen for incoming remote peer connection on the provided + address. Otherwise, the address defines where to connect to in order to join + the remote peer, and is used at the protocol level to identify and validate the remote peer on the server side. - During a soft restart, local peer : is used by the old instance to + During a soft restart, local peer address is used by the old instance to connect the new one and initiate a complete replication (teaching process). It is strongly recommended to have the exact same peers declaration on all @@ -3790,12 +3792,13 @@ peer : [param*] Note: "peer" keyword may transparently be replaced by "server" keyword (see "server" keyword explanation below). -server [:] [param*] +server [
:] [param*] +server [/] [param*] As previously mentioned, "peer" keyword may be replaced by "server" keyword with a support for all "server" parameters found in 5.2 paragraph that are - related to transport settings. If the underlying peer is local, : - parameters must not be present; these parameters must be provided on a "bind" - line (see "bind" keyword of this "peers" section). + related to transport settings. If the underlying peer is local, the address + parameter must not be present; it must be provided on a "bind" line (see + "bind" keyword of this "peers" section). A number of "server" parameters are irrelevant for "peers" sections. Peers by nature do not support dynamic host name resolution nor health checks, hence