mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Retry quiet to deal with kasp test timing issue
In the cases where we test SOA serial updates and TTL updates, we check
if for "all zones loaded" to ensure the new zone content is loaded. But
this is the unsigned zone, the signed zone still needs to be produced.
There is thus a timing issue where the dig request comes in before
the signing process has finished.
Add a retry quiet to mitigate against it.
(cherry picked from commit 827bba05a0)
This commit is contained in:
parent
b442b9521b
commit
2174c566ff
1 changed files with 17 additions and 18 deletions
|
|
@ -4660,6 +4660,17 @@ dnssec_verify
|
|||
# an unlimited lifetime. Fallback to the default loadkeys interval.
|
||||
check_next_key_event 3600
|
||||
|
||||
_check_soa_ttl() {
|
||||
dig_with_opts @10.53.0.6 example SOA > dig.out.ns6.test$n.soa2 || return 1
|
||||
soa1=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa1)
|
||||
soa2=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa2)
|
||||
ttl1=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa1)
|
||||
ttl2=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa2)
|
||||
test ${soa1:-1000} -lt ${soa2:-0} || return 1
|
||||
test ${ttl1:-0} -eq $1 || return 1
|
||||
test ${ttl2:-0} -eq $2 || return 1
|
||||
}
|
||||
|
||||
echo_i "Check that 'rndc reload' of just the serial updates the signed instance ($n)"
|
||||
TSIG=
|
||||
ret=0
|
||||
|
|
@ -4668,15 +4679,9 @@ cp ns6/example2.db.in ns6/example.db || ret=1
|
|||
nextpart ns6/named.run > /dev/null
|
||||
rndccmd 10.53.0.6 reload || ret=1
|
||||
wait_for_log 3 "all zones loaded" ns6/named.run
|
||||
sleep 1
|
||||
dig_with_opts @10.53.0.6 example SOA > dig.out.ns6.test$n.soa2 || ret=1
|
||||
soa1=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa1)
|
||||
soa2=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa2)
|
||||
ttl1=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa1)
|
||||
ttl2=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa2)
|
||||
test ${soa1:-1000} -lt ${soa2:-0} || ret=1
|
||||
test ${ttl1:-0} -eq 300 || ret=1
|
||||
test ${ttl2:-0} -eq 300 || ret=1
|
||||
# Check that the SOA SERIAL increases and check the TTLs (should be 300 as
|
||||
# defined in ns6/example2.db.in).
|
||||
retry_quiet 10 _check_soa_ttl 300 300 || ret=1
|
||||
test "$ret" -eq 0 || echo_i "failed"
|
||||
status=$((status+ret))
|
||||
n=$((n+1))
|
||||
|
|
@ -4692,15 +4697,9 @@ rm ns6/example.db.jnl
|
|||
nextpart ns6/named.run > /dev/null
|
||||
start_server --noclean --restart --port ${PORT} kasp ns6
|
||||
wait_for_log 3 "all zones loaded" ns6/named.run
|
||||
sleep 1
|
||||
dig_with_opts @10.53.0.6 example SOA > dig.out.ns6.test$n.soa2 || ret=1
|
||||
soa1=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa1)
|
||||
soa2=$(awk '$4 == "SOA" { print $7 }' dig.out.ns6.test$n.soa2)
|
||||
ttl1=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa1)
|
||||
ttl2=$(awk '$4 == "SOA" { print $2 }' dig.out.ns6.test$n.soa2)
|
||||
test ${soa1:-1000} -lt ${soa2:-0} || ret=1
|
||||
test ${ttl1:-0} -eq 300 || ret=1
|
||||
test ${ttl2:-0} -eq 400 || ret=1
|
||||
# Check that the SOA SERIAL increases and check the TTLs (should be changed
|
||||
# from 300 to 400 as defined in ns6/example3.db.in).
|
||||
retry_quiet 10 _check_soa_ttl 300 400 || ret=1
|
||||
test "$ret" -eq 0 || echo_i "failed"
|
||||
status=$((status+ret))
|
||||
n=$((n+1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue