2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

On some slower systems the startup is delayed and this causes an

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.
This commit is contained in:
Evan Hunt
2009-09-04 17:14:58 +00:00
parent 8d0a1ede2f
commit 30a60d2aff

View File

@@ -15,13 +15,31 @@
# 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