mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 23:28:18 -04:00
The fstrm_capture utility is started in the background during the
"dnstap" system test. Consequently, "rndc dnstap-reopen" and similar
commands may be executed before fstrm_capture starts listening on the
Unix domain socket it is configured to receive dnstap data on. This
results in the dnstap data sent to that socket in the meantime to be
lost; while the fstrm writer thread is able to recover from such a
scenario within a couple of seconds (by reopening the configured dnstap
destination itself), only one write attempt is made for data
successfully queued to the writer thread, so dnstap frames can still be
lost in the process. This may happen during the "dnstap" system test,
leading to the dnstap output file being empty, which in turn causes the
test to fail.
Fix by waiting until fstrm_capture starts listening on the Unix domain
socket it is configured to use before asking named to reopen the
configured dnstap destination. Since various fstrm_capture versions log
different messages when the listening socket is set up, wait for a
common string that works for all fstrm_capture versions released to
date. Add a few extra debug messages indicating test progress and make
the test fail if the expected fstrm_capture log message is not generated
within 10 seconds.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| ns1 | ||
| ns2 | ||
| ns3 | ||
| ns4 | ||
| bad-fstrm-reopen-interval.conf | ||
| bad-fstrm-set-buffer-hint-max.conf | ||
| bad-fstrm-set-buffer-hint-min.conf | ||
| bad-fstrm-set-flush-timeout-max.conf | ||
| bad-fstrm-set-flush-timeout-min.conf | ||
| bad-fstrm-set-input-queue-size-max.conf | ||
| bad-fstrm-set-input-queue-size-min.conf | ||
| bad-fstrm-set-input-queue-size-po2.conf | ||
| bad-fstrm-set-output-notify-threshold.conf | ||
| bad-fstrm-set-output-queue-size-max.conf | ||
| bad-fstrm-set-output-queue-size-min.conf | ||
| bad-fstrm-set-reopen-interval-max.conf | ||
| bad-fstrm-set-reopen-interval-min.conf | ||
| bad-missing-dnstap-output-view.conf | ||
| bad-missing-dnstap-output.conf | ||
| bad-size-version.conf | ||
| clean.sh | ||
| good-dnstap-in-options.conf | ||
| good-dnstap-in-view.conf | ||
| good-fstrm-reopen-interval.conf | ||
| good-fstrm-set-buffer-hint.conf | ||
| good-fstrm-set-flush-timeout.conf | ||
| good-fstrm-set-input-queue-size.conf | ||
| good-fstrm-set-output-notify-threshold.conf | ||
| good-fstrm-set-output-queue-model-mpsc.conf | ||
| good-fstrm-set-output-queue-model-spsc.conf | ||
| good-fstrm-set-output-queue-size.conf | ||
| good-fstrm-set-reopen-interval.conf | ||
| good-size-unlimited.conf | ||
| good-size-version.conf | ||
| large-answer.fstrm | ||
| prereq.sh | ||
| README | ||
| setup.sh | ||
| tests.sh | ||
| tests_dnstap.py | ||
| tests_sh_dnstap.py | ||
| ydump.py | ||
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.
The "large-answer.fstrm" file was generated by configuring a named instance
compiled with --enable-dnstap and --enable-fixed-rrset with the following
directives:
minimal-responses yes;
rrset-order { order fixed; };
dnstap { auth response; };
dnstap-identity none;
dnstap-output file "large-answer.fstrm";
The captured RRset from the "example." zone was created using:
$GENERATE 1-48 @ IN A 127.0.0.$
A server instance set up this way was then queried non-recursively (RD=0) for
"example/A".