]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
On some slower systems the startup is delayed and this causes an
authorEvan Hunt <each@isc.org>
Fri, 4 Sep 2009 17:14:58 +0000 (17:14 +0000)
committerEvan Hunt <each@isc.org>
Fri, 4 Sep 2009 17:14:58 +0000 (17:14 +0000)
apparent transfer failure on the initial calls to dig.  Adding a test
here to make sure the zones are fully loaded before attempting to query
them.

bin/tests/system/nsupdate/tests.sh

index 0fe02c49f26223efa4add77e69fa6f9408c8c663..4de05ba9620e6634435c189871c6bcb9577af4d2 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.27 2009/07/29 23:47:43 tbox Exp $
+# $Id: tests.sh,v 1.28 2009/09/04 17:14:58 each Exp $
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
 
+# wait for zone transfer to complete
+tries=0
+while true; do
+    if [ $tries -eq 10 ]
+    then
+        exit 1
+    fi
+
+    if grep "example.nil/IN.*Transfer completed" ns2/named.run > /dev/null
+    then
+        break
+    else
+        echo "I:zones are not fully loaded, waiting..."
+        tries=`expr $tries + 1`
+        sleep 1
+    fi
+done
+
 echo "I:fetching first copy of zone before update"
 $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
        @10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1