mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 23:28:18 -04:00
Test trying of the next primary server
Add test cases which check that when a XoT primary server is unreachable or is already marked as unreachble then the next primary server in the list is used.
This commit is contained in:
parent
3262ebd0f3
commit
12225d125b
5 changed files with 48 additions and 0 deletions
|
|
@ -63,6 +63,11 @@ zone "axfr-rndc-retransfer-force" {
|
|||
file "axfr-rndc-retransfer-force.db";
|
||||
};
|
||||
|
||||
zone "xot-primary-try-next" {
|
||||
type primary;
|
||||
file "xot-primary-try-next.db";
|
||||
};
|
||||
|
||||
zone "axfr-too-big" {
|
||||
type primary;
|
||||
file "axfr-too-big.db";
|
||||
|
|
|
|||
14
bin/tests/system/xfer/ns1/xot-primary-try-next.db
Normal file
14
bin/tests/system/xfer/ns1/xot-primary-try-next.db
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
; 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 .
|
||||
|
|
@ -77,6 +77,12 @@ zone "axfr-rndc-retransfer-force" {
|
|||
file "axfr-rndc-retransfer-force.bk";
|
||||
};
|
||||
|
||||
zone "xot-primary-try-next" {
|
||||
type secondary;
|
||||
primaries { 10.53.0.99 port @EXTRAPORT1@ tls ephemeral; 10.53.0.1; };
|
||||
file "xot-primary-try-next.bk";
|
||||
};
|
||||
|
||||
zone "axfr-too-big" {
|
||||
type secondary;
|
||||
max-records 30;
|
||||
|
|
|
|||
|
|
@ -660,6 +660,28 @@ wait_for_message() (
|
|||
grep -F "$1" wait_for_message.$n >/dev/null
|
||||
)
|
||||
|
||||
nextpart ns6/named.run >/dev/null
|
||||
|
||||
n=$((n + 1))
|
||||
echo_i "test that named tries the next primary in the list when the first one fails (XoT -> Do53) ($n)"
|
||||
tmp=0
|
||||
$RNDCCMD 10.53.0.6 retransfer xot-primary-try-next 2>&1 | sed 's/^/ns6 /' | cat_i
|
||||
msg="'xot-primary-try-next/IN' from 10.53.0.1#${PORT}: Transfer status: success"
|
||||
retry_quiet 60 wait_for_message "$msg" || tmp=1
|
||||
if test $tmp != 0; then echo_i "failed"; fi
|
||||
status=$((status + tmp))
|
||||
|
||||
nextpart ns6/named.run >/dev/null
|
||||
|
||||
n=$((n + 1))
|
||||
echo_i "test that named tries the next primary in the list when the first one is already marked as unreachable (XoT -> Do53) ($n)"
|
||||
tmp=0
|
||||
$RNDCCMD 10.53.0.6 retransfer xot-primary-try-next 2>&1 | sed 's/^/ns6 /' | cat_i
|
||||
msg="'xot-primary-try-next/IN' from 10.53.0.1#${PORT}: Transfer status: success"
|
||||
retry_quiet 60 wait_for_message "$msg" || tmp=1
|
||||
if test $tmp != 0; then echo_i "failed"; fi
|
||||
status=$((status + tmp))
|
||||
|
||||
# Restart ns1 with -T transferslowly
|
||||
stop_server ns1
|
||||
copy_setports ns1/named2.conf.in ns1/named.conf
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ pytestmark = pytest.mark.extra_artifacts(
|
|||
"ns6/primary.db",
|
||||
"ns6/primary.db.jnl",
|
||||
"ns6/sec.bk",
|
||||
"ns6/xot-primary-try-next.bk",
|
||||
"ns7/edns-expire.bk",
|
||||
"ns7/primary2.db",
|
||||
"ns7/sec.bk",
|
||||
|
|
|
|||
Loading…
Reference in a new issue