Commit 6d501384 authored by Witold Krecicki's avatar Witold Krecicki
Browse files

Use rndc_reload in tests, make sure that reload is complete before continuing

parent 517449e0
...@@ -33,7 +33,7 @@ $DIG $DIGOPTS tsigzone. \ ...@@ -33,7 +33,7 @@ $DIG $DIGOPTS tsigzone. \
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
copy_setports ns2/named2.conf.in ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 5 sleep 5
# prefix 10/8 should fail # prefix 10/8 should fail
...@@ -56,7 +56,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; ...@@ -56,7 +56,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1;
echo_i "testing nested ACL processing" echo_i "testing nested ACL processing"
# all combinations of 10.53.0.{1|2} with key {one|two}, should succeed # all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
copy_setports ns2/named3.conf.in ns2/named.conf copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 5 sleep 5
# should succeed # should succeed
...@@ -102,7 +102,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; ...@@ -102,7 +102,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
# now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two # now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two
copy_setports ns2/named4.conf.in ns2/named.conf copy_setports ns2/named4.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 5 sleep 5
# should succeed # should succeed
...@@ -137,7 +137,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; ...@@ -137,7 +137,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
echo_i "testing allow-query-on ACL processing" echo_i "testing allow-query-on ACL processing"
copy_setports ns2/named5.conf.in ns2/named.conf copy_setports ns2/named5.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 5 sleep 5
t=`expr $t + 1` t=`expr $t + 1`
$DIG -p ${PORT} +tcp soa example. \ $DIG -p ${PORT} +tcp soa example. \
...@@ -161,7 +161,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1 ...@@ -161,7 +161,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret` status=`expr $status + $ret`
echo_i "calling rndc reconfig" echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reconfig ns3 10.53.0.3
sleep 1 sleep 1
...@@ -190,7 +190,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1 ...@@ -190,7 +190,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret` status=`expr $status + $ret`
echo_i "calling rndc reconfig" echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i rndc_reconfig ns4 10.53.0.4
sleep 1 sleep 1
......
...@@ -218,8 +218,7 @@ dotests ...@@ -218,8 +218,7 @@ dotests
echo_i "reconfiguring server: minimal-responses no" echo_i "reconfiguring server: minimal-responses no"
copy_setports ns1/named2.conf.in ns1/named.conf copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reconfig ns1 10.53.0.1
sleep 2
echo_i "testing with 'minimal-responses no;'" echo_i "testing with 'minimal-responses no;'"
minimal=no minimal=no
...@@ -236,8 +235,7 @@ fi ...@@ -236,8 +235,7 @@ fi
echo_i "reconfiguring server: minimal-any yes" echo_i "reconfiguring server: minimal-any yes"
copy_setports ns1/named3.conf.in ns1/named.conf copy_setports ns1/named3.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reconfig ns1 10.53.0.1
sleep 2
n=`expr $n + 1` n=`expr $n + 1`
echo_i "testing with 'minimal-any yes;' over UDP ($n)" echo_i "testing with 'minimal-any yes;' over UDP ($n)"
...@@ -272,8 +270,7 @@ dotests ...@@ -272,8 +270,7 @@ dotests
echo_i "reconfiguring server: minimal-responses no-auth-recursive" echo_i "reconfiguring server: minimal-responses no-auth-recursive"
copy_setports ns1/named4.conf.in ns1/named.conf copy_setports ns1/named4.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reconfig ns1 10.53.0.1
sleep 2
echo_i "testing with 'minimal-responses no-auth-recursive;'" echo_i "testing with 'minimal-responses no-auth-recursive;'"
minimal=no-auth-recursive minimal=no-auth-recursive
...@@ -303,8 +300,7 @@ fi ...@@ -303,8 +300,7 @@ fi
echo_i "reconfiguring server: minimal-responses no" echo_i "reconfiguring server: minimal-responses no"
copy_setports ns1/named2.conf.in ns1/named.conf copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reconfig ns1 10.53.0.1
sleep 2
n=`expr $n + 1` n=`expr $n + 1`
echo_i "testing NS handling in ANY responses (authoritative) ($n)" echo_i "testing NS handling in ANY responses (authoritative) ($n)"
......
...@@ -469,8 +469,7 @@ status=`expr $status + $ret` ...@@ -469,8 +469,7 @@ status=`expr $status + $ret`
echo_i "reconfiguring server with multiple views" echo_i "reconfiguring server with multiple views"
rm -f ns2/named.conf rm -f ns2/named.conf
copy_setports ns2/named2.conf.in ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/I:ns2 /' rndc_reconfig ns2 10.53.0.2
sleep 5
echo_i "adding new zone to external view ($n)" echo_i "adding new zone to external view ($n)"
# NOTE: The internal view has "recursion yes" set, and so queries for # NOTE: The internal view has "recursion yes" set, and so queries for
...@@ -591,8 +590,7 @@ status=`expr $status + $ret` ...@@ -591,8 +590,7 @@ status=`expr $status + $ret`
echo_i "reconfiguring server with multiple views and new-zones-directory" echo_i "reconfiguring server with multiple views and new-zones-directory"
rm -f ns2/named.conf rm -f ns2/named.conf
copy_setports ns2/named3.conf.in ns2/named.conf copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/I:ns2 /' rndc_reconfig ns2 10.53.0.2
sleep 5
echo_i "checking new zone is still loaded after dir change ($n)" echo_i "checking new zone is still loaded after dir change ($n)"
ret=0 ret=0
...@@ -659,8 +657,7 @@ status=`expr $status + $ret` ...@@ -659,8 +657,7 @@ status=`expr $status + $ret`
echo_i "ensure the configuration context is cleaned up correctly ($n)" echo_i "ensure the configuration context is cleaned up correctly ($n)"
ret=0 ret=0
$RNDCCMD 10.53.0.2 reconfig > /dev/null 2>&1 || ret=1 rndc_reconfig ns2 10.53.0.2
sleep 5
$RNDCCMD 10.53.0.2 status > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.2 status > /dev/null 2>&1 || ret=1
n=`expr $n + 1` n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi if [ $ret != 0 ]; then echo_i "failed"; fi
...@@ -670,8 +667,7 @@ echo_i "check delzone after reconfig failure ($n)" ...@@ -670,8 +667,7 @@ echo_i "check delzone after reconfig failure ($n)"
ret=0 ret=0
$RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1
copy_setports ns3/named2.conf.in ns3/named.conf copy_setports ns3/named2.conf.in ns3/named.conf
$RNDCCMD 10.53.0.3 reconfig > /dev/null 2>&1 && ret=1 rndc_reconfgi ns3 10.53.0.3
sleep 5
$RNDCCMD 10.53.0.3 delzone inlineslave.example > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.3 delzone inlineslave.example > /dev/null 2>&1 || ret=1
n=`expr $n + 1` n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi if [ $ret != 0 ]; then echo_i "failed"; fi
......
...@@ -55,14 +55,6 @@ SYSTEMTESTTOP=.. ...@@ -55,14 +55,6 @@ SYSTEMTESTTOP=..
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}" DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload 2>&1 | sed 's/^/'$1' /'`"
for try in 0 1 2 3 4 5 6 7 8 9; do
nextpart $1/named.run | grep "reloading configuration succeeded" > /dev/null && break
sleep 1
done
}
status=0 status=0
n=0 n=0
......
...@@ -1227,7 +1227,7 @@ rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l` ...@@ -1227,7 +1227,7 @@ rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
[ "$rekey_calls" -eq 0 ] || ret=1 [ "$rekey_calls" -eq 0 ] || ret=1
# ...then we add auto-dnssec and reconfigure # ...then we add auto-dnssec and reconfigure
$RNDCCMD 10.53.0.3 modzone reconf.example '{ type master; file "reconf.example.db"; allow-update { any; }; auto-dnssec maintain; };' 2>&1 | sed 's/^/ns3 /' | cat_i $RNDCCMD 10.53.0.3 modzone reconf.example '{ type master; file "reconf.example.db"; allow-update { any; }; auto-dnssec maintain; };' 2>&1 | sed 's/^/ns3 /' | cat_i
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reconfig ns3 10.53.0.3
for i in 0 1 2 3 4 5 6 7 8 9; do for i in 0 1 2 3 4 5 6 7 8 9; do
lret=0 lret=0
rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l` rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
......
...@@ -148,7 +148,7 @@ if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi ...@@ -148,7 +148,7 @@ if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
n=`expr $n + 1` n=`expr $n + 1`
echo_i "Checking that reloading empty zones is silent ($n)" echo_i "Checking that reloading empty zones is silent ($n)"
$RNDCCMD 10.53.0.1 reload > /dev/null rndc_reload ns1 10.53.0.1
ret=0 ret=0
grep "automatic empty zone" ns1/named.run > /dev/null || ret=1 grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1 grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1
......
...@@ -240,6 +240,26 @@ nextpartpeek() { ...@@ -240,6 +240,26 @@ nextpartpeek() {
nextpartread $1 2> /dev/null nextpartread $1 2> /dev/null
} }
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload $3 2>&1 | sed 's/^/'$1' /'`"
# reloading single zone is synchronous, if we're reloading whole server
# we need to wait for reload to finish
if [ -z "$3" ]; then
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
sleep 1
done
fi
}
rndc_reconfig() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/'$1' /'`"
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
sleep 1
done
}
# #
# Export command paths # Export command paths
# #
......
...@@ -93,7 +93,7 @@ addr=`eval echo "$out" | cut -f1 -d'#'` ...@@ -93,7 +93,7 @@ addr=`eval echo "$out" | cut -f1 -d'#'`
status=`expr $status + $ret` status=`expr $status + $ret`
newtest "testing DLZ driver is cleaned up on reload" newtest "testing DLZ driver is cleaned up on reload"
$RNDCCMD 10.53.0.1 reload 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reload ns1 10.53.0.1
for i in 0 1 2 3 4 5 6 7 8 9; do for i in 0 1 2 3 4 5 6 7 8 9; do
ret=0 ret=0
grep 'dlz_example: shutting down zone example.nil' ns1/named.run > /dev/null 2>&1 || ret=1 grep 'dlz_example: shutting down zone example.nil' ns1/named.run > /dev/null 2>&1 || ret=1
......
...@@ -1825,7 +1825,7 @@ lines=$(wc -l < rndc.out.ns4.test$n.1) ...@@ -1825,7 +1825,7 @@ lines=$(wc -l < rndc.out.ns4.test$n.1)
rndccmd 10.53.0.4 nta secure.example 2>&1 | sed 's/^/ns4 /' | cat_i rndccmd 10.53.0.4 nta secure.example 2>&1 | sed 's/^/ns4 /' | cat_i
rndccmd 10.53.0.4 nta fakenode.secure.example 2>&1 | sed 's/^/ns4 /' | cat_i rndccmd 10.53.0.4 nta fakenode.secure.example 2>&1 | sed 's/^/ns4 /' | cat_i
# reload should maintain NTAs # reload should maintain NTAs
rndccmd 10.53.0.4 reload 2>&1 | sed 's/^/ns4 /' | cat_i rndc_reload ns4 10.53.0.4
rndccmd 10.53.0.4 nta -d > rndc.out.ns4.test$n.2 rndccmd 10.53.0.4 nta -d > rndc.out.ns4.test$n.2
lines=$(wc -l < rndc.out.ns4.test$n.2) lines=$(wc -l < rndc.out.ns4.test$n.2)
[ "$lines" -eq 4 ] || ret=1 [ "$lines" -eq 4 ] || ret=1
...@@ -2788,7 +2788,7 @@ for file in K*.moved; do ...@@ -2788,7 +2788,7 @@ for file in K*.moved; do
done done
$SIGNER -S -N increment -e now+1mi -o expiring.example expiring.example.db > /dev/null 2>&1 $SIGNER -S -N increment -e now+1mi -o expiring.example expiring.example.db > /dev/null 2>&1
) || ret=1 ) || ret=1
rndccmd 10.53.0.3 reload expiring.example 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reload ns3 10.53.0.3 expiring.example
rndccmd 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i rndccmd 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i
dig_with_answeropts +cd expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n dig_with_answeropts +cd expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n
......
...@@ -145,7 +145,7 @@ grep "loading params for dyndb 'sample2' from .*named.conf:" ns1/named.run > /de ...@@ -145,7 +145,7 @@ grep "loading params for dyndb 'sample2' from .*named.conf:" ns1/named.run > /de
status=`expr $status + $ret` status=`expr $status + $ret`
echo_i "checking dyndb still works after reload" echo_i "checking dyndb still works after reload"
$RNDCCMD 10.53.0.1 reload 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reload ns1 10.53.0.1
test_add test5.ipv4.example.nil. A "10.53.0.10" || ret=1 test_add test5.ipv4.example.nil. A "10.53.0.10" || ret=1
status=`expr $status + $ret` status=`expr $status + $ret`
......
...@@ -21,8 +21,7 @@ n=0 ...@@ -21,8 +21,7 @@ n=0
n=`expr $n + 1` n=`expr $n + 1`
echo_i "check that switching to automatic empty zones works ($n)" echo_i "check that switching to automatic empty zones works ($n)"
ret=0 ret=0
$RNDCCMD 10.53.0.1 reload > /dev/null || ret=1 rndc_reload ns1 10.53.0.1
sleep 5
copy_setports ns1/named2.conf.in ns1/named.conf copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reload > /dev/null || ret=1 $RNDCCMD 10.53.0.1 reload > /dev/null || ret=1
......
...@@ -116,7 +116,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi ...@@ -116,7 +116,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret` status=`expr $status + $ret`
copy_setports ns3/named2.conf.in ns3/named.conf copy_setports ns3/named2.conf.in ns3/named.conf
$RNDCCMD reconfig 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reconfig ns3 10.53.0.3
echo_i "checking lame server clients are dropped at the per-domain limit" echo_i "checking lame server clients are dropped at the per-domain limit"
ret=0 ret=0
...@@ -155,7 +155,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi ...@@ -155,7 +155,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret` status=`expr $status + $ret`
copy_setports ns3/named3.conf.in ns3/named.conf copy_setports ns3/named3.conf.in ns3/named.conf
$RNDCCMD reconfig 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reconfig ns3 10.53.0.3
echo_i "checking lame server clients are dropped near the soft limit" echo_i "checking lame server clients are dropped near the soft limit"
ret=0 ret=0
......
...@@ -749,13 +749,13 @@ $TESTSOCK6 fd92:7065:b8e:ffff::1 || { ...@@ -749,13 +749,13 @@ $TESTSOCK6 fd92:7065:b8e:ffff::1 || {
# Reconfiguring for IPv6 tests # Reconfiguring for IPv6 tests
echo_i "reconfiguring servers" echo_i "reconfiguring servers"
copy_setports ns1/named2.conf.in ns1/named.conf copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i rndc_reconfig ns1 10.53.0.1
copy_setports ns2/named2.conf.in ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reconfig ns2 10.53.0.2
copy_setports ns3/named2.conf.in ns3/named.conf copy_setports ns3/named2.conf.in ns3/named.conf
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reconfig ns3 10.53.0.3
copy_setports ns4/named2.conf.in ns4/named.conf copy_setports ns4/named2.conf.in ns4/named.conf
$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i rndc_reconfig ns4 10.53.0.4
# BEGIN IPv6 TESTS # BEGIN IPv6 TESTS
......
...@@ -37,7 +37,7 @@ status=`expr $status + $ret` ...@@ -37,7 +37,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named2.conf.in ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -56,7 +56,7 @@ status=`expr $status + $ret` ...@@ -56,7 +56,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named3.conf.in ns2/named.conf copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -75,7 +75,7 @@ status=`expr $status + $ret` ...@@ -75,7 +75,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named4.conf.in ns2/named.conf copy_setports ns2/named4.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -95,7 +95,7 @@ status=`expr $status + $ret` ...@@ -95,7 +95,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named5.conf.in ns2/named.conf copy_setports ns2/named5.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -115,7 +115,7 @@ status=`expr $status + $ret` ...@@ -115,7 +115,7 @@ status=`expr $status + $ret`
n=`expr $n + 1` n=`expr $n + 1`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named6.conf.in ns2/named.conf copy_setports ns2/named6.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
if $TESTSOCK6 fd92:7065:b8e:ffff::3 if $TESTSOCK6 fd92:7065:b8e:ffff::3
...@@ -146,7 +146,7 @@ status=`expr $status + $ret` ...@@ -146,7 +146,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named7.conf.in ns2/named.conf copy_setports ns2/named7.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -165,7 +165,7 @@ status=`expr $status + $ret` ...@@ -165,7 +165,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named8.conf.in ns2/named.conf copy_setports ns2/named8.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -184,7 +184,7 @@ status=`expr $status + $ret` ...@@ -184,7 +184,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named9.conf.in ns2/named.conf copy_setports ns2/named9.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -203,7 +203,7 @@ status=`expr $status + $ret` ...@@ -203,7 +203,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named10.conf.in ns2/named.conf copy_setports ns2/named10.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -222,7 +222,7 @@ status=`expr $status + $ret` ...@@ -222,7 +222,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named11.conf.in ns2/named.conf copy_setports ns2/named11.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -241,7 +241,7 @@ status=`expr $status + $ret` ...@@ -241,7 +241,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named12.conf.in ns2/named.conf copy_setports ns2/named12.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -260,7 +260,7 @@ status=`expr $status + $ret` ...@@ -260,7 +260,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named13.conf.in ns2/named.conf copy_setports ns2/named13.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -273,7 +273,7 @@ status=`expr $status + $ret` ...@@ -273,7 +273,7 @@ status=`expr $status + $ret`
echo_i "reloading server" echo_i "reloading server"
copy_setports ns2/named14.conf.in ns2/named.conf copy_setports ns2/named14.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
n=`expr $n + 1` n=`expr $n + 1`
...@@ -293,7 +293,7 @@ status=`expr $status + $ret` ...@@ -293,7 +293,7 @@ status=`expr $status + $ret`
n=`expr $n + 1` n=`expr $n + 1`
echo_i "reloading server with different geoip-directory ($n)" echo_i "reloading server with different geoip-directory ($n)"
copy_setports ns2/named15.conf.in ns2/named.conf copy_setports ns2/named15.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i rndc_reload ns2 10.53.0.2
sleep 3 sleep 3
awk '/using "..\/data2" as GeoIP directory/ {m=1} ; { if (m>0) { print } }' ns2/named.run | grep "GeoIP City .* DB not available" > /dev/null || ret=1 awk '/using "..\/data2" as GeoIP directory/ {m=1} ; { if (m>0) { print } }' ns2/named.run | grep "GeoIP City .* DB not available" > /dev/null || ret=1
[ $ret -eq 0 ] || echo_i "failed" [ $ret -eq 0 ] || echo_i "failed"
......
...@@ -332,7 +332,7 @@ n=`expr $n + 1` ...@@ -332,7 +332,7 @@ n=`expr $n + 1`
echo_i "check adding of record to unsigned master ($n)" echo_i "check adding of record to unsigned master ($n)"
ret=0 ret=0
cp ns3/master2.db.in ns3/master.db cp ns3/master2.db.in ns3/master.db
$RNDCCMD 10.53.0.3 reload master 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reload ns3 10.53.0.3 master
for i in 1 2 3 4 5 6 7 8 9 for i in 1 2 3 4 5 6 7 8 9
do do
ans=0 ans=0
...@@ -350,7 +350,7 @@ n=`expr $n + 1` ...@@ -350,7 +350,7 @@ n=`expr $n + 1`
echo_i "check adding record fails when SOA serial not changed ($n)" echo_i "check adding record fails when SOA serial not changed ($n)"
ret=0 ret=0
echo "c A 10.0.0.3" >> ns3/master.db echo "c A 10.0.0.3" >> ns3/master.db
$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i rndc_reload ns3 10.53.0.3
sleep 1 sleep 1
$DIG $DIGOPTS @10.53.0.3 c.master A > dig.out.ns3.test$n $DIG $DIGOPTS @10.53.0.3 c.master A > dig.out.ns3.test$n
grep "NXDOMAIN" dig.out.ns3.test$n > /dev/null || ret=1 grep "NXDOMAIN" dig.out.ns3.test$n > /dev/null || ret=1
...@@ -605,7 +605,7 @@ status=`expr $status + $ret` ...@@ -605,7 +605,7 @@ status=`expr $status + $ret`
copy_setports ns5/named.conf.post ns5/named.conf copy_setports ns5/named.conf.post ns5/named.conf
(cd ns5; $KEYGEN -q -a rsasha256 bits) > /dev/null 2>&1