From 863a0dbd20962cb84ff2655fb4716e7ccf40468f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 30 May 2011 07:28:13 +0000 Subject: [PATCH] The old active key could be deleted before the "former standby key has now signed fully" ran causing it to fail. Delay the deletion by 10 seconds. --- bin/tests/system/autosign/tests.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index ac42dffe6b..74c9522184 100644 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.4.6.19 2011/05/26 23:10:11 each Exp $ +# $Id: tests.sh,v 1.4.6.20 2011/05/30 07:28:13 marka Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -732,11 +732,12 @@ file="ns1/`cat vanishing.key`.private" rm -f $file echo "I:preparing ZSK roll" +starttime=`date +%s` oldfile=`cat active.key` oldid=`sed 's/^K.+007+0*//' < active.key` newfile=`cat standby.key` newid=`sed 's/^K.+007+0*//' < standby.key` -$SETTIME -K ns1 -I now+2s -D now+15 $oldfile > /dev/null +$SETTIME -K ns1 -I now+2s -D now+25 $oldfile > /dev/null $SETTIME -K ns1 -i 0 -S $oldfile $newfile > /dev/null # note previous zone serial number @@ -878,6 +879,16 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +# +# Work out how long we need to sleep. Allow 4 seconds for the records +# to be removed. +# +now=`date +%s` +sleep=`expr $starttime + 29 - $now` +case $sleep in +-*|0);; +*) echo "I: sleep $sleep"; sleep $sleep;; +esac echo "I:checking former active key was removed ($n)" ret=0 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1