[v9_9] don't go nonresponsive during "rndc reload"

3617.	[bug]		Named was failing to answer queries during
			"rndc reload" [RT #34098]
(cherry picked from commit 964bdcd7ad)
This commit is contained in:
Evan Hunt
2013-07-11 10:57:19 -07:00
parent 0bbc017b99
commit f3e5684b09
3 changed files with 22 additions and 11 deletions

View File

@@ -338,12 +338,18 @@ sed -e 's/0 0 0 0 0/1 0 0 0 0/' < ns2/example.db.in > ns2/example.db
sed -e 's/0 0 0 0 0/1 0 0 0 0/' -e 's/\.1$/.2/' < ns2/redirect.db.in > ns2/redirect.db
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload > rndc.out || ret=1
sed 's/^/I:ns2 /' rndc.out
$DIG $DIGOPTS +short @10.53.0.2 soa example.nil > dig.out.ns1.test$n || ret=1
set -- `cat dig.out.ns1.test$n`
[ $3 = 1 ] || ret=1
$DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
grep "100.100.100.2" dig.out.ns2.test$n > /dev/null || ret=1
for i in 1 2 3 4 5 6 7 8 9; do
tmp=0
$DIG $DIGOPTS +short @10.53.0.2 soa example.nil > dig.out.ns1.test$n || tmp=1
set -- `cat dig.out.ns1.test$n`
[ $3 = 1 ] || tmp=1
$DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || tmp=1
grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || tmp=1
grep "100.100.100.2" dig.out.ns2.test$n > /dev/null || tmp=1
[ $tmp -eq 0 ] && break
sleep 1
done
[ $tmp -eq 1 ] && ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`