Retry multiple times in doth test when checking if the zone file exists

Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

(cherry picked from commit 5d5d4b523b)
This commit is contained in:
Aram Sargsyan 2023-03-07 14:12:10 +00:00
parent 5ed65ce81f
commit 0b80d442ac

View file

@ -122,7 +122,7 @@ n=$((n + 1))
echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via implicit IP) ($n)"
ret=0
if retry_quiet 10 wait_for_tls_xfer 2 example4; then
test -f "ns2/example4.db" || ret=1
retry_quiet 5 test -f "ns2/example4.db" || ret=1
else
echo_i "timed out waiting for zone transfer"
grep "^;" "dig.out.ns2.example4.test$n" | cat_i
@ -135,7 +135,7 @@ n=$((n + 1))
echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via specified IPv4) ($n)"
ret=0
if retry_quiet 10 wait_for_tls_xfer 2 example5; then
test -f "ns2/example5.db" || ret=1
retry_quiet 5 test -f "ns2/example5.db" || ret=1
else
echo_i "timed out waiting for zone transfer"
grep "^;" "dig.out.ns2.example5.test$n" | cat_i
@ -148,7 +148,7 @@ n=$((n + 1))
echo_i "testing incoming XoT functionality (from the first secondary, StrictTLS via specified IPv6) ($n)"
ret=0
if retry_quiet 10 wait_for_tls_xfer 2 example6; then
test -f "ns2/example6.db" || ret=1
retry_quiet 5 test -f "ns2/example6.db" || ret=1
else
echo_i "timed out waiting for zone transfer"
grep "^;" "dig.out.ns2.example6.test$n" | cat_i
@ -183,7 +183,7 @@ n=$((n + 1))
echo_i "testing incoming XoT functionality (from the first secondary, MutualTLS) ($n)"
ret=0
if retry_quiet 10 wait_for_tls_xfer 2 example9; then
test -f "ns2/example9.db" || ret=1
retry_quiet 5 test -f "ns2/example9.db" || ret=1
else
echo_i "timed out waiting for zone transfer"
grep "^;" "dig.out.ns2.example9.test$n" | cat_i