]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Be consistent with regard to health-check modes transition
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 14 Apr 2025 15:28:28 +0000 (17:28 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 Apr 2025 09:33:01 +0000 (11:33 +0200)
commit3d8ff5425bbbefc878df6fda6c05113d0d939887
tree3d7cd17ff7c5c40564c6bca5641a792c6301dd76
parent9647835dc1003f224b8fedd7278402408750e332
dnsdist: Be consistent with regard to health-check modes transition

Calling `setAuto()` on a backend used to set the health-check mode
to `active`, even if it had been set to `lazy` before, which was
quite confusing.
This commit introduces a new method, `setAutoActive()` which can
be used to change the health-check mode to `active`, and alters the
behaviour of `setAuto()` to restore the previous health-check mode
instead. This is a breaking change but since the default health-check
mode is `active` I don't expect to break any existing configurations.
It also introduces a new method, `getHealthCheckMode()`, to inspect
the current mode.
13 files changed:
pdns/dnsdistdist/dnsdist-backend.cc
pdns/dnsdistdist/dnsdist-carbon.cc
pdns/dnsdistdist/dnsdist-configuration-yaml.cc
pdns/dnsdistdist/dnsdist-discovery.cc
pdns/dnsdistdist/dnsdist-lua-bindings.cc
pdns/dnsdistdist/dnsdist-lua.cc
pdns/dnsdistdist/dnsdist-web.cc
pdns/dnsdistdist/dnsdist.cc
pdns/dnsdistdist/dnsdist.hh
pdns/dnsdistdist/docs/reference/config.rst
pdns/dnsdistdist/docs/upgrade_guide.rst
pdns/dnsdistdist/test-dnsdistbackend_cc.cc
regression-tests.dnsdist/test_HealthChecks.py