]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: dns: check and link servers' resolvers right after config parsing
authorBaptiste Assmann <bedis9@gmail.com>
Fri, 10 Aug 2018 08:56:38 +0000 (10:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Sep 2018 17:41:30 +0000 (19:41 +0200)
commit044fd5bc2c37cf53550ad75a9bee8be30de242df
treef7d2077272a0008349420c500f8632c12835b4a3
parent54620523e2a75b961da9c6ce70fd91fcb7788856
BUG/MINOR: dns: check and link servers' resolvers right after config parsing

On the Mailing list, Marcos Moreno reported that haproxy configuration
validation (through "haproxy -c cfgfile") does not detect when a
resolvers section does not exist for a server.
That said, this checking is done after HAProxy has started up.

The problem is that this can create production issue, since init
script can't detect the problem before starting / reloading HAProxy.

To fix this issue, this patch registers the function which validates DNS
configuration validity and run it right after configuration parsing is
finished (through cfg_register_postparser()).
Thanks to it, now "haproxy -c cfgfile" will fail when a server
points to a non-existing resolvers section (or any other validation made
by the function above).

Backport status: 1.8
src/dns.c