]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: dns: Kill idle DNS sessions during stopping stage
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 11 Apr 2023 05:44:34 +0000 (07:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 11 Apr 2023 06:19:06 +0000 (08:19 +0200)
commite0f4717727548e2f2dc0e1033b4043ad41827547
tree42f6b2bf2f772dd55e73b1dfcdd807e41bcdb447
parent211452ef9af93d7eb25c9a339ced766ad51acd96
BUG/MEDIUM: dns: Kill idle DNS sessions during stopping stage

There is no server timeout for DNS sessions over TCP. It means idle session
cannot be killed by itself. There is a task running peridically, every 5s,
to kill the excess of idle sessions. But the last one is never
killed. During the stopping stage, it is an issue since the dynamic
resolutions are no longer performed (2ec6f14c "BUG/MEDIUM: resolvers:
Properly stop server resolutions on soft-stop").

Before the above commit, during stopping stage, the DNS sessions were killed
when a resolution was triggered. Now, nothing kills these sessions. This
prevents the process to finish on soft-stop.

To fix this bug, the task killing excess of idle sessions now kill all idle
sessions on stopping stage.

This patch must be backported as far as 2.6.
src/dns.c