Give some time to server to initialize

This commit is contained in:
Petr Menšík 2024-04-03 18:49:28 +02:00
commit f7aba615ec

View file

@ -66,16 +66,16 @@ buCheckSecureNameservers() {
return 1
fi
for NS in ${SERVERS}; do
# use tcp to fail faster on ipv6 global route not available
if [ -n "$bu_DELV" ]; then
if $bu_DELV @$NS | grep -q '^; fully validated'; then
if $bu_DELV +tcp @$NS | grep -q '^; fully validated'; then
bu_SECURE_SERVERS+="$NS "
else
bu_FAILED_SERVERS+="$NS "
fi
elif [ -n "$bu_DIG" ]; then
if $bu_DIG +noall +answer +dnssec @$NS | grep -qw RRSIG; then
if $bu_DIG +tcp +noall +answer +dnssec @$NS | grep -qw RRSIG; then
bu_SECURE_SERVERS+="$NS "
else
bu_FAILED_SERVERS+="$NS "
@ -242,14 +242,19 @@ rlJournalStart
fi
rlAssertExists $bu_ROOT_HINTS
# use buCheckSecureNameservers
rlRun "HINTS4=$(buGetRootServerAddresses4 $bu_ROOT_HINTS)"
rlRun "HINTS6=$(buGetRootServerAddresses6 $bu_ROOT_HINTS)"
rlRun "HINTS4=\"$(buGetRootServerAddresses4 $bu_ROOT_HINTS)\""
rlRun "HINTS6=\"$(buGetRootServerAddresses6 $bu_ROOT_HINTS)\""
SKIP_TEST=''
if ! rlRun buCheckSecureNameservers \"$HINTS4 $HINTS6\"
if ! rlRun "buCheckSecureNameservers \"$HINTS4 $HINTS6\""
then
SKIP_TEST=y
rlLogWarning "No root-servers reachable, skipping the test."
fi
WORKING_NUM=0
for NSIP in ${bu_SECURE_SERVERS}; do
WORKING_NUM=$((WORKING_NUM+1))
done
rlAssertGreater "Check we have at least some working servers" "$WORKING_NUM" 3
rlLog "Working root-servers: $bu_SECURE_SERVERS"
[ -n "$bu_FAILED_SERVERS" ] && rlLogWarning "Failed root-servers: $bu_FAILED_SERVERS"
@ -262,6 +267,8 @@ if [ "$SKIP_TEST" != y ]; then
for I in {1..3}; do
rlPhaseStartTest "Basic test #$I"
rlRun "rlServiceStart named"
# give it chance to warm up
sleep 5
buDigSuccessSecure @localhost . DNSKEY
buDigSuccessSecure @localhost
@ -272,6 +279,7 @@ for I in {1..3}; do
rlRun "grep \"^./RSASHA256/$KEYID\" /var/named/data/named.secroots" 0 "Check trust anchor is trusted"
[ "$HAS_MANAGED_KEYS" = y ] && rlRun "rndc managed-keys status"
rlPhaseEnd
sleep 5
done
rlPhaseStartTest "Host tests #$I"