mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Check 'rndc freeze' with in-view zones works
This commit is contained in:
parent
812d1027f7
commit
ebc92b799b
@ -18,6 +18,7 @@ rm -f ns2/nil.db ns2/other.db ns2/static.db ns2/*.jnl
|
|||||||
rm -f ns2/session.key
|
rm -f ns2/session.key
|
||||||
rm -f ns3/named_dump.db*
|
rm -f ns3/named_dump.db*
|
||||||
rm -f ns4/*.nta
|
rm -f ns4/*.nta
|
||||||
|
rm -f ns4/example.db ns4/example.db.jnl
|
||||||
rm -f ns4/key?.conf
|
rm -f ns4/key?.conf
|
||||||
rm -f ns6/huge.zone.db
|
rm -f ns6/huge.zone.db
|
||||||
rm -f ns*/named.conf
|
rm -f ns*/named.conf
|
||||||
|
@ -15,13 +15,22 @@ options {
|
|||||||
listen-on { 10.53.0.4; };
|
listen-on { 10.53.0.4; };
|
||||||
listen-on-v6 { none; };
|
listen-on-v6 { none; };
|
||||||
recursion yes;
|
recursion yes;
|
||||||
dnssec-validation yes;
|
dnssec-validation yes;
|
||||||
};
|
};
|
||||||
|
|
||||||
view normal {
|
view normal {
|
||||||
match-clients { any; };
|
match-clients { any; };
|
||||||
|
|
||||||
|
zone example {
|
||||||
|
type primary;
|
||||||
|
file "example.db";
|
||||||
|
allow-update { any; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
view "view with a space" {
|
view "view with a space" {
|
||||||
match-clients { none; };
|
match-clients { none; };
|
||||||
|
zone example {
|
||||||
|
in-view normal;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,8 @@ $SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/nil.db
|
|||||||
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/other.db
|
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/other.db
|
||||||
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/static.db
|
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/static.db
|
||||||
|
|
||||||
|
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns4/example.db
|
||||||
|
|
||||||
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns6/huge.zone.db
|
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns6/huge.zone.db
|
||||||
|
|
||||||
# we make the huge zone less huge if we're running under
|
# we make the huge zone less huge if we're running under
|
||||||
|
@ -40,7 +40,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
|
|||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
|
|
||||||
echo_i "rndc freeze"
|
echo_i "rndc freeze"
|
||||||
$RNDCCMD 10.53.0.2 freeze | sed 's/^/ns2 /' | cat_i | cat_i
|
$RNDCCMD 10.53.0.2 freeze | sed 's/^/ns2 /' | cat_i
|
||||||
|
|
||||||
n=$((n+1))
|
n=$((n+1))
|
||||||
echo_i "checking zone was dumped ($n)"
|
echo_i "checking zone was dumped ($n)"
|
||||||
@ -426,7 +426,7 @@ n=$((n+1))
|
|||||||
echo_i "testing automatic zones are reported ($n)"
|
echo_i "testing automatic zones are reported ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf status > rndc.out.1.test$n || ret=1
|
$RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf status > rndc.out.1.test$n || ret=1
|
||||||
grep "number of zones: 200 (198 automatic)" rndc.out.1.test$n > /dev/null || ret=1
|
grep "number of zones: 201 (198 automatic)" rndc.out.1.test$n > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
|
|
||||||
@ -689,5 +689,49 @@ lines=`cat rndc.out.test$n | wc -l`
|
|||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
|
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "check 'rndc freeze' with in-view zones works ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf freeze > rndc.out.test$n 2>&1 || ret=1
|
||||||
|
test -s rndc.out.test$n && sed 's/^/ns2 /' rndc.out.test$n | cat_i
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "checking non in-view zone instance is not writable ($n)"
|
||||||
|
ret=0
|
||||||
|
$NSUPDATE -p ${PORT} > /dev/null 2>&1 <<END && ret=1
|
||||||
|
server 10.53.0.4
|
||||||
|
zone example.
|
||||||
|
update add text2.example. 600 IN TXT "addition 3"
|
||||||
|
send
|
||||||
|
END
|
||||||
|
$DIG $DIGOPTS @10.53.0.4 -p ${PORT} text2.example. TXT > dig.out.1.test$n
|
||||||
|
grep 'addition 3' dig.out.1.test$n >/dev/null && ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "check 'rndc thaw' with in-view zones works ($n)"
|
||||||
|
ret=0
|
||||||
|
$RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf thaw > rndc.out.test$n 2>&1 || ret=1
|
||||||
|
test -s rndc.out.test$n && sed 's/^/ns2 /' rndc.out.test$n | cat_i
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
|
n=$((n+1))
|
||||||
|
echo_i "checking non in-view zone instance is now writable ($n)"
|
||||||
|
ret=0
|
||||||
|
$NSUPDATE -p ${PORT} > nsupdate.out.test$n 2>&1 <<END || ret=1
|
||||||
|
server 10.53.0.4
|
||||||
|
zone example.
|
||||||
|
update add text2.example. 600 IN TXT "addition 3"
|
||||||
|
send
|
||||||
|
END
|
||||||
|
$DIG $DIGOPTS @10.53.0.4 -p ${PORT} text2.example. TXT > dig.out.1.test$n
|
||||||
|
grep 'addition 3' dig.out.1.test$n >/dev/null || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status+ret))
|
||||||
|
|
||||||
echo_i "exit status: $status"
|
echo_i "exit status: $status"
|
||||||
[ $status -eq 0 ] || exit 1
|
[ $status -eq 0 ] || exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user