2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Avoid false positive in serve-stale system test check

The purpose of the check is to verify the server has survived the
previous barrage of queries. This is done by sending a query and
checking we get a NOERROR response back.

Previously, that query could've been affected by a servfail cache - the
server would return a SERVFAIL answer, thus failing the check, despite
being up and running. Use version.bind txt ch query to avoid the
interference of servfail cache.
This commit is contained in:
Tom Krizek
2023-06-13 10:52:01 +02:00
parent c1879b54c3
commit dd7bcd2855

View File

@@ -1834,7 +1834,7 @@ while [ $num -lt 20 ]; do
num=$((num+1)) num=$((num+1))
done; done;
_dig_data() { _dig_data() {
$DIG -p ${PORT} @10.53.0.3 data.example TXT >dig.out.test$n || return 1 $DIG -p ${PORT} @10.53.0.3 version.bind txt ch >dig.out.test$n || return 1
grep "status: NOERROR" dig.out.test$n > /dev/null || return 1 grep "status: NOERROR" dig.out.test$n > /dev/null || return 1
} }
retry_quiet 5 _dig_data || ret=1 retry_quiet 5 _dig_data || ret=1