BUG/MEDIUM: resolvers: Trigger a DNS resolution if an ADD item is obsolete
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Mar 2021 17:38:37 +0000 (18:38 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Mar 2021 08:30:17 +0000 (09:30 +0100)
commit02cf7b78bf2b0594a4531bfc733e1f8d7d1f42d7
tree56c7b408bf1ddd3ee88f6f877a913e3e091b7a47
parentdb001949af4a2199cbc9bf1ed70152a7dbc58035
BUG/MEDIUM: resolvers: Trigger a DNS resolution if an ADD item is obsolete

When a ADD item attached to a SRV item is removed because it is obsolete, we
must trigger a DNS resolution to be sure the hostname still resolves or
not. There is no other way to be the entry is still valid. And we cannot set
the server in RMAINT immediatly, because a DNS server may be inconsitent and
may stop to add some additionnal records.

The opposite is also true. If a valid ADD item is still attached to a SRV
item, any DNS resolution must be stopped. There is no reason to perform
extra resolution in this case.

This patch must be backported as far as 2.2.

(cherry picked from commit 3e0600fbbfee7daf957033505d56bc8dcc874185)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/dns.c