BUG/MEDIUM: server: do not forget to generate the dynamic servers ids
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 9 Jun 2021 07:58:47 +0000 (09:58 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Jun 2021 09:42:53 +0000 (11:42 +0200)
commit406aaef55ada9c0f31c540de404f53f74f124af8
tree831a823e12c38fb40364b35c1a92d3c17a4999dc
parent82d7f774639a5eb4424d53bb396ee18634cdc6fc
BUG/MEDIUM: server: do not forget to generate the dynamic servers ids

If no id is specified by the user for a dynamic server, it is necessary
to generate a new one. This operation is now done at the end of 'add
server' CLI handler. The server is then inserted into the proxy ids
tree.

Without this, several features may be broken for dynamic servers. Among
them, there is the "first" lb algorithm, the persistence using
stick-tables or the uniqueness internal check of srv_parse_id.

This must be backported up to 2.4.
src/server.c