mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Test the new min-transfer-rate-in configuration option
Add a new big zone, run a zone transfer in slow mode, and check whether the zone transfer gets canceled because 100000 bytes are not transferred in 5 seconds (as it's running in slow mode).
This commit is contained in:
committed by
Arаm Sаrgsyаn
parent
f6dfff01ab
commit
b9c6aa24f8
15
bin/tests/system/xfer/ns1/axfr-min-transfer-rate.db
Normal file
15
bin/tests/system/xfer/ns1/axfr-min-transfer-rate.db
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
;
|
||||||
|
; SPDX-License-Identifier: MPL-2.0
|
||||||
|
;
|
||||||
|
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
;
|
||||||
|
; See the COPYRIGHT file distributed with this work for additional
|
||||||
|
; information regarding copyright ownership.
|
||||||
|
|
||||||
|
$TTL 3600
|
||||||
|
@ IN SOA . . 0 0 0 0 0
|
||||||
|
@ IN NS .
|
||||||
|
$GENERATE 1-5000 host$ TXT data-$
|
@@ -47,6 +47,10 @@ zone "edns-expire" {
|
|||||||
file "edns-expire.db";
|
file "edns-expire.db";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "axfr-min-transfer-rate" {
|
||||||
|
type primary;
|
||||||
|
file "axfr-min-transfer-rate.db";
|
||||||
|
};
|
||||||
|
|
||||||
zone "axfr-max-transfer-time" {
|
zone "axfr-max-transfer-time" {
|
||||||
type primary;
|
type primary;
|
||||||
|
@@ -36,6 +36,11 @@ zone "." {
|
|||||||
file "root.db";
|
file "root.db";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "axfr-min-transfer-rate" {
|
||||||
|
type primary;
|
||||||
|
file "axfr-min-transfer-rate.db";
|
||||||
|
};
|
||||||
|
|
||||||
zone "axfr-max-transfer-time" {
|
zone "axfr-max-transfer-time" {
|
||||||
type primary;
|
type primary;
|
||||||
file "axfr-max-transfer-time.db";
|
file "axfr-max-transfer-time.db";
|
||||||
|
@@ -32,6 +32,7 @@ options {
|
|||||||
ixfr-from-differences primary;
|
ixfr-from-differences primary;
|
||||||
check-integrity no;
|
check-integrity no;
|
||||||
tcp-idle-timeout 600;
|
tcp-idle-timeout 600;
|
||||||
|
min-transfer-rate-in 10240 300; # this is tested as seconds, when used with '-T transferinsecs' (i.e. convert the default '10240 5' back so that it doesn't interfere with other tests)
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "." {
|
zone "." {
|
||||||
@@ -57,6 +58,13 @@ zone "edns-expire" {
|
|||||||
file "edns-expire.bk";
|
file "edns-expire.bk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "axfr-min-transfer-rate" {
|
||||||
|
type secondary;
|
||||||
|
min-transfer-rate-in 100000 5; # this is tested as seconds, when used with '-T transferinsecs' (i.e. 100000 bytes in 5 seconds)
|
||||||
|
primaries { 10.53.0.1; };
|
||||||
|
file "axfr-min-transfer-rate.bk";
|
||||||
|
};
|
||||||
|
|
||||||
zone "axfr-max-transfer-time" {
|
zone "axfr-max-transfer-time" {
|
||||||
type secondary;
|
type secondary;
|
||||||
max-transfer-time-in 1; # this is tested as seconds, when used with '-T transferinsecs'
|
max-transfer-time-in 1; # this is tested as seconds, when used with '-T transferinsecs'
|
||||||
|
@@ -709,11 +709,22 @@ status=$((status + tmp))
|
|||||||
|
|
||||||
nextpart ns6/named.run >/dev/null
|
nextpart ns6/named.run >/dev/null
|
||||||
|
|
||||||
|
n=$((n + 1))
|
||||||
|
echo_i "test min-transfer-rate-in with 5 seconds timeout ($n)"
|
||||||
|
$RNDCCMD 10.53.0.6 retransfer axfr-min-transfer-rate 2>&1 | sed 's/^/ns6 /' | cat_i
|
||||||
|
tmp=0
|
||||||
|
retry_quiet 10 wait_for_message "minimum transfer rate reached: timed out" || tmp=1
|
||||||
|
if test $tmp != 0; then echo_i "failed"; fi
|
||||||
|
status=$((status + tmp))
|
||||||
|
|
||||||
|
nextpart ns6/named.run >/dev/null
|
||||||
|
|
||||||
n=$((n + 1))
|
n=$((n + 1))
|
||||||
echo_i "test max-transfer-time-in with 1 second timeout ($n)"
|
echo_i "test max-transfer-time-in with 1 second timeout ($n)"
|
||||||
$RNDCCMD 10.53.0.6 retransfer axfr-max-transfer-time 2>&1 | sed 's/^/ns6 /' | cat_i
|
$RNDCCMD 10.53.0.6 retransfer axfr-max-transfer-time 2>&1 | sed 's/^/ns6 /' | cat_i
|
||||||
tmp=0
|
tmp=0
|
||||||
retry_quiet 10 wait_for_message "maximum transfer time exceeded: timed out" || tmp=1
|
retry_quiet 10 wait_for_message "maximum transfer time exceeded: timed out" || tmp=1
|
||||||
|
if test $tmp != 0; then echo_i "failed"; fi
|
||||||
status=$((status + tmp))
|
status=$((status + tmp))
|
||||||
|
|
||||||
# Restart ns1 with -T transferstuck
|
# Restart ns1 with -T transferstuck
|
||||||
@@ -730,6 +741,7 @@ start=$(date +%s)
|
|||||||
$RNDCCMD 10.53.0.6 retransfer axfr-max-idle-time 2>&1 | sed 's/^/ns6 /' | cat_i
|
$RNDCCMD 10.53.0.6 retransfer axfr-max-idle-time 2>&1 | sed 's/^/ns6 /' | cat_i
|
||||||
tmp=0
|
tmp=0
|
||||||
retry_quiet 60 wait_for_message "maximum idle time exceeded: timed out" || tmp=1
|
retry_quiet 60 wait_for_message "maximum idle time exceeded: timed out" || tmp=1
|
||||||
|
if test $tmp != 0; then echo_i "failed"; fi
|
||||||
if [ $tmp -eq 0 ]; then
|
if [ $tmp -eq 0 ]; then
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
diff=$((now - start))
|
diff=$((now - start))
|
||||||
|
@@ -41,6 +41,7 @@ pytestmark = pytest.mark.extra_artifacts(
|
|||||||
"ns4/root.db",
|
"ns4/root.db",
|
||||||
"ns6/axfr-max-idle-time.bk",
|
"ns6/axfr-max-idle-time.bk",
|
||||||
"ns6/axfr-max-transfer-time.bk",
|
"ns6/axfr-max-transfer-time.bk",
|
||||||
|
"ns6/axfr-min-transfer-rate.bk",
|
||||||
"ns6/axfr-rndc-retransfer-force.bk",
|
"ns6/axfr-rndc-retransfer-force.bk",
|
||||||
"ns6/edns-expire.bk",
|
"ns6/edns-expire.bk",
|
||||||
"ns6/ixfr-too-big.bk",
|
"ns6/ixfr-too-big.bk",
|
||||||
|
Reference in New Issue
Block a user