2025-06-26 11:28:11 -04:00
|
|
|
# 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.
|
|
|
|
|
|
|
|
|
|
|
2025-07-08 09:26:09 -04:00
|
|
|
def test_configloading_log(ns1):
|
2025-06-26 11:28:11 -04:00
|
|
|
"""
|
|
|
|
|
This test is a "guard/warning" to make sure the named.conf loading
|
2025-09-10 09:17:11 -04:00
|
|
|
(parsing), keystore building, kasplist building and view creation is done
|
|
|
|
|
outside of the exclusive mode (so, named is still able to answer queries
|
|
|
|
|
and operating normally in case of configuration reload). It
|
2025-06-26 11:28:11 -04:00
|
|
|
is currently based on logging, so it's quite brittle.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
log_sequence = [
|
|
|
|
|
"load_configuration",
|
|
|
|
|
"parsing user configuration from ",
|
|
|
|
|
"apply_configuration",
|
2025-09-10 09:17:11 -04:00
|
|
|
"apply_configuration: configure_keystores",
|
|
|
|
|
"apply_configuration: configure_kasplist",
|
|
|
|
|
"apply_configuration: create_views",
|
2025-06-26 11:28:11 -04:00
|
|
|
"loop exclusive mode: starting",
|
|
|
|
|
]
|
|
|
|
|
|
2025-07-08 09:26:09 -04:00
|
|
|
with ns1.watch_log_from_start() as watcher:
|
2025-06-26 11:28:11 -04:00
|
|
|
watcher.wait_for_sequence(log_sequence)
|
|
|
|
|
|
2025-07-08 09:26:09 -04:00
|
|
|
with ns1.watch_log_from_here() as watcher:
|
|
|
|
|
ns1.rndc("reconfig")
|
2025-06-26 11:28:11 -04:00
|
|
|
watcher.wait_for_sequence(log_sequence)
|
|
|
|
|
|
2025-07-08 09:26:09 -04:00
|
|
|
with ns1.watch_log_from_here() as watcher:
|
|
|
|
|
ns1.rndc("reload")
|
2025-06-26 11:28:11 -04:00
|
|
|
watcher.wait_for_sequence(log_sequence)
|