BUG/MINOR: server: Set server without addr but with dns in RMAINT on startup

On startup, if a server has no address but the dns resolutions are configured,
"none" method is added to the default init-addr methods, in addition to "last"
and "libc". Thus on startup, this server is set to RMAINT mode if no address is
found. It is only performed if no other init-addr method is configured.

Setting the RMAINT mode on startup is important to inhibit the health checks.

For instance, following servers will now be set to RMAINT mode on startup :

  server srv nofound.tld:80 check resolvers mydns
  server srv _http._tcp.service.local check resolvers mydns
  server-template srv 1-3 _http._tcp.service.local check resolvers mydns

while followings ones will trigger an error :

  server srv nofound.tld:80 check
  server srv nofound.tld:80 check resolvers mydns init-addr libc
  server srv _http._tcp.service.local check
  server srv _http._tcp.service.local check resolvers mydns init-addr libc
  server-template srv 1-3 _http._tcp.service.local check resolvers mydns init-addr libc

This patch must be backported as far as 1.8.

(cherry picked from commit ac1c60fd9c63dd9ac4bab7e9a9f24fb347a5fbdf)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 13704ca2d0de919935c91246ce582d7f22160051)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit bad9df31c215bd5ad9bac424e63f94b9510d4724)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed