2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

43024 Commits

Author SHA1 Message Date
Štěpán Balážik
3d0da96a90 Run an additional respdiff job for merge requests and schedules
On MRs it uses the merge target as the reference.
In schedules it uses the latest released version for this branch as the
reference.

(cherry picked from commit 9a6e8b9190990c81dadbb5bb7e5bf1ed60aaad8c)
2025-07-06 16:08:24 +02:00
Michał Kępień
9d3fd52413 chg: doc: Set up version for BIND 9.20.12
Merge branch 'michal/set-up-version-for-bind-9.20.12' into 'bind-9.20'

See merge request isc-projects/bind9!10693
2025-07-04 22:16:27 +02:00
Michał Kępień
51797ecf0f Update BIND version to 9.20.12-dev 2025-07-04 22:10:03 +02:00
Michał Kępień
c6b2e3128e
Update BIND version for release v9.20.11 2025-07-04 11:37:38 +02:00
Michał Kępień
3fc2fef47d new: doc: Prepare documentation for BIND 9.20.11
Merge branch 'michal/prepare-documentation-for-bind-9.20.11' into 'v9.20.11-release'

See merge request isc-private/bind9!817
2025-07-04 11:33:28 +02:00
Michał Kępień
09e3eb9814
Tweak and reword release notes 2025-07-03 23:08:05 +02:00
Michał Kępień
39f41a2476
Prepare release notes for BIND 9.20.11 2025-07-03 23:08:05 +02:00
Michał Kępień
def4dbc3eb
Generate changelog for BIND 9.20.11 2025-07-03 23:08:05 +02:00
Michał Kępień
055a592fd9 [9.20] [CVE-2025-40777] sec: usr: Fix a possible assertion failure when using the 'stale-answer-client-timeout 0' option
In specific circumstances the :iscman:`named` resolver process could
terminate unexpectedly when stale answers were enabled and the
``stale-answer-client-timeout 0`` configuration option was used.
This has been fixed.

Backport of !808

See isc-projects/bind9#5372

Merge branch 'backport-5372-security-serve-stale-crash-on-insist-unreachable-9.20' into 'v9.20.11-release'

See merge request isc-private/bind9!815
2025-07-03 14:17:14 +02:00
Aram Sargsyan
9c7a63142d
Reset DNS_DBFIND_STALETIMEOUT in query_lookup()
If ns__query_start() is called because of a chained query (e.g.
after encountering a CNAME), a previously set DNS_DBFIND_STALETIMEOUT
flag on the query's 'dboptions' field can cause an assertion
failure if the new query's 'stalefirst' value is not true (e.g. if the
target qname is an authoritative zone for the server). Reset the
DNS_DBFIND_STALETIMEOUT flag in the query_lookup() function before
evaluating the 'stalefirst' value, and make sure to assign a fresh
value to the `stalefirst' flag instead of conditionally assigning it
only if the value is 'true'.

(cherry picked from commit 3d8bd8bbf15322c0c317e76364b53ba7ea88def5)
2025-07-03 13:54:41 +02:00
Ondřej Surý
e8ffe3a15c [9.20] fix: usr: Fix the default interface-interval from 60s to 60m
When the interface-interval parser was changed from uint32 parser to
duration parser, the default value stayed at plain number `60` which
now means 60 seconds instead of 60 minutes.  The documentation also
incorrectly states that the value is in minutes.  That has been fixed.

Closes #5246

Backport of MR !10281

Merge branch 'backport-5246-fix-default-interface-interval-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10679
2025-07-01 14:47:12 +02:00
Ondřej Surý
7e1e384164
Fix the default interface-interval docs and default value
When the interface-interval parser was changed from uint32 parser to
duration parser, the default value stayed at plain 60 which now means 60
seconds instead of 60 minutes.  Fix the default value and the
documentation to match the reality.

(cherry picked from commit de08c0088dbdeac7e97c343835f4fdb465dff27d)
2025-07-01 12:13:55 +02:00
Colin Vidal
9f5860e4e7 [9.20] new: test: add startup root DNSKEY refresh system test
Root trust anchors are automatically updated as described in RFC5011.
Add a system test which ensures the root DNSKEYs are always queried by
named during startup.

Because this test uses real internet DNS root servers, it is enabled
only when `CI_ENABLE_LIVE_INTERNET_TESTS` is set.

Backport of MR !10615

Merge branch 'backport-colin/updaterootdnskey-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10674
2025-06-30 15:28:52 +02:00
Colin Vidal
5bfae10fa5 add startup root DNSKEY refresh system test
Root trust anchors are automatically updated as described in RFC5011.
Add a system test which ensures the root DNSKEYs are always queried by
named during startup.

Because this test uses real internet DNS root servers, it is enabled
only when `CI_ENABLE_LIVE_INTERNET_TESTS` is set.

(cherry picked from commit b0a33f77dce28d21036739c565cc0037ca605893)
2025-06-30 12:52:12 +00:00
Štěpán Balážik
35cec00cae [9.20] fix: nil: Only run ci-orphaned-anchors on MR events
Now, it is also run in schedules and most annoyingly on push which means
that it is run twice on a push to a branch where a MR exists and `.gitlab-ci.yml` is changed.

This was an oversight in https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/10654

Backport of MR !10668

Merge branch 'backport-stepan/remove-additional-pipeline-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10669
2025-06-28 12:25:45 +00:00
Štěpán Balážik
e4a45d5ebe Only run ci-orphaned-anchors on MR events
Now, it is also run in schedules and most annoyingly on push which means
that it is run twice on a push to a branch where a MR exists.

(cherry picked from commit 7ca18df58a328690f788a474aefbb73e053616db)
2025-06-28 10:54:44 +00:00
Nicki Křížek
ab063cb4ec [9.20] chg: test: Improve pytest log output
- increase clarity of multiline messages
- support `isc.query.*()` query&response logging
- replace use of `print()` statement with proper logging
- omit empty lines from test result output

Backport of MR !10590

Merge branch 'backport-nicki/improve-pytest-logging-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10660
2025-06-27 20:30:30 +02:00
Nicki Křížek
c0ca8854c5 Log assertion failures right after test result
The extra messages are typically traceback from assertion failures.
Previously, they'd be printed only after all individual test case
results have been printed. That made it difficult to pair the traceback
to the failing test in some cases, as the node information (aka test
name) might not always be present.

Instead, log any extra messages related to a particular test failure
directly after reporting its result, making the failure details more
readily available and easy to connect with a particular test case.

(cherry picked from commit fcf31417ddee33be028f69a1ea4326ccede46d78)
2025-06-27 20:30:21 +02:00
Nicki Křížek
88549e8849 Log command stdout when using isctest.run.cmd()
The command's stdout may provide useful debug info, so make sure we log
it by default. It doesn't seem to have a significant impact on the log
size.

(cherry picked from commit 9f3f6ec38e2ebb5314b1df72d0b28eb951a61038)
2025-06-27 20:30:21 +02:00
Nicki Křížek
9549c8885a Log query and response when using isctest.query.*
Make sure the queries and responses are logged at the DEBUG level, which
may provide useful information in case of failing tests.

This doesn't seem to significantly increase the overall artifacts size.
Previously, pytest.log.txt files from all system tests would take around
3 MB, with this change, it's around 8 MB).

(cherry picked from commit 56fec9ba04b3ddb82591d2c9edf4f073d650209c)
2025-06-27 20:30:21 +02:00
Nicki Křížek
7aa00bcddc Use proper logging in SPNEGO tests
Avoid using print() and use proper logging facility instead.

(cherry picked from commit 51ac5bdd14030cec2c04db648c6991136e8f4d40)
2025-06-27 20:30:21 +02:00
Nicki Křížek
03af371948 Add options for query&response logging to pytest
In some cases, it's useful to log the sent and received DNS messages.
Add options to enable this on demand. Query is only logged the first
time it's sent, since it doesn't change. If response logging is turned
on, then each response is logged, since it might be different every
time.

(cherry picked from commit 1e87b5ffc6c689942d37274659c78c382c1c6988)
2025-06-27 20:30:21 +02:00
Nicki Křížek
a6599a0822 Indent multiline output in pytest logging
When multiline message is logged, indent all but the first line (which
will be preceeded by the LOG_FORMAT). This improves the clarity of logs,
as it's immediately clear which lines are regular log output, and which
ones are multiline debug output.

Adjust the isctest.run.cmd() stdout/stderr logging to this new format.

(cherry picked from commit 23e6b49cc57cb41a0260686366e7ba86cac0ec4a)
2025-06-27 20:30:21 +02:00
Nicki Křížek
129dd186fc Don't log empty test result messages
The messages obtained from test results may contain stuff like detailed
failure/error information, tracebacks etc. In many cases, the message
will be empty, in which case it doesn't need to be logged.

For an example, run test with many test cases, e.g.
verify/test_verify.py, and inspect the tail of the pytest.log.txt before
and after this commit.

(cherry picked from commit 0a6b0cf68c6553f7eeef06fb507c1b28b9c61f38)
2025-06-27 20:30:21 +02:00
Nicki Křížek
2b77921470 Replace print statements in checkds test
Use isctest.log logging facility for consistent and predictable logging
output rather than using print(). Remove writes of stderr, as that
output will be logged in the debug log in case the commands called with
isctest.run.cmd() fails.

(cherry picked from commit 4b8998e4ad1eda6e4fca23c362dd8034d6cce3fa)
2025-06-27 20:30:21 +02:00
Štěpán Balážik
90175e49df [9.20] new: ci: Add a check for defined but never used anchors in .gitlab-ci.yaml
If an new orphan anchor is (`.anchor: &anchor` with no corresponding `*anchor` elsewhere in the file) is introduced the CI job will.

Depends on https://gitlab.isc.org/isc-projects/bind9-qa/-/merge_requests/101 (merge that first and then drop the `--branch` commit).

Backport of MR !10654

Merge branch 'backport-stepan/ci-orphaned-anchors-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10666
2025-06-27 17:18:17 +00:00
Štěpán Balážik
5602c2565f Remove orphaned anchors in .gitlab-ci.yml
These were left there after previous refactors.

(cherry picked from commit 919f5d6419edfd99a184a8eb72ca50dc4812eb7d)
2025-06-27 16:43:52 +00:00
Štěpán Balážik
cbc113ecb9 Add a check for defined but never used anchors in .gitlab-ci.yaml
If a anchor is ever orphaned, this will fail in CI.

(cherry picked from commit 5ed2b6c08099f6f21021cbe740d76cd593292121)
2025-06-27 16:43:52 +00:00
Štěpán Balážik
91267eee58 Don't redifine stage:precheck in ci-variables job definition
The value is defined in the *precheck_job anchor.

(cherry picked from commit 9331451c5f38d912de07c34fa2a570416818c661)
2025-06-27 16:43:51 +00:00
Štěpán Balážik
709b8687b0 [9.20] fix: nil: Move root zone mirror system test to a separate directory
This test doesn't require artifact checking but when bundled in the same
directory with the shell based tests, the `system:clang:tsan` job was
failing non-deterministically.

An example of the job failing and succeeding on the same commit:
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/5809299
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/5809447

Backport of MR !10659

Merge branch 'backport-stepan/move-root-zone-mirror-test-to-a-separate-directory-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10662
2025-06-27 16:09:06 +00:00
Štěpán Balážik
96e8e72dbe Move root zone mirror system test to a separate directory
This test doesn't require artifact checking but when bundled in the same
directory with the shell based tests, the `system:clang:tsan` job was
failing non-deterministically.

(cherry picked from commit d5874d5df96259bda5c240fe785c97decdec1e23)
2025-06-27 17:28:27 +02:00
Štěpán Balážik
d4341c6111 [9.20] new: test: Add a system test that ensures root zone mirroring works out of the box
This is a test for #5380.

Backport of MR !10596

Merge branch 'backport-stepan/mirror-root-zone-from-the-internet-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10657
2025-06-27 15:22:16 +00:00
Štěpán Balážik
97caa0addc Add a system test that ensures root zone mirroring works out of the box
This is a test for #5380.

(cherry picked from commit a69efc678c1e0ee282002ea7afbf93dc104f54ae)
2025-06-27 12:10:40 +00:00
Štěpán Balážik
e2a91c06c8 Add a pytest mark for system tests that require Internet connection
We skip those by default as:

a) we don't want to stress the upstream servers in every CI pipeline
b) system tests need to be runnable in a isolated environment by default

(cherry picked from commit 3a8ffc74df5f097afa9cd2b7073dc732824e82dd)
2025-06-27 12:10:40 +00:00
Štěpán Balážik
02cf400dc9 Rename CI_ENABLE_ALL_TESTS to CI_ENABLE_LONG_TESTS
New name is more descriptive and allows us to created more optional
test sets.

(cherry picked from commit c7a8f6105578c43f6d1d1a60e54d5c84ad7470a8)
2025-06-27 12:10:39 +00:00
Štěpán Balážik
abe7547799 [9.20] fix: ci: Ensure that junit.xml is present and non-empty after each system/unit test job
Previously, JUnit files were not generated or were generated empty for various reasons for some system/unit test runs.

Now, the number of tests collected for a MR is up from about 4k to 5.8k in the "Tests" tab of a pipeline.

Additionally, there is a check that ensures that [a somewhat sane](c5a271eb8b) `junit.xml` file is generated after every system/unit test job and fails the job otherwise.

Closes #5316

Backport of MR !10556

Merge branch 'backport-5316-ensure-junit-xml-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10649
2025-06-26 15:37:05 +00:00
Štěpán Balážik
d8e6609aaa Use :global-test-result: when converting trs file to JUnit XML
There might be more than one :test-result: and they are collated into
the :global-test-result: field.

This only happens when system tests are run with `make check`.
2025-06-26 17:05:20 +02:00
Štěpán Balážik
af4b445257 Clean up the definitions and usages of &unit_test_* anchors
Remove redundant indirections and overwrites.

(cherry picked from commit 4303e0691968824ae8b8938e1ab121386f32f83a)
2025-06-26 17:05:20 +02:00
Štěpán Balážik
c052007d05 Hoist the junit and artifact handling to the &unit_test_common anchor
In some cases the report wasn't generated, sometimes it wasn't kept
properly. This unifies the way artifacts are generated and kept.

(cherry picked from commit 4ec1a37ca090df41f046e20c6a6c788e7a4a0afe)
2025-06-26 17:05:20 +02:00
Štěpán Balážik
aa10df5111 Clean up the definitions and usages of &system_test_* anchors
Remove redundant indirections and overwrites.

(cherry picked from commit cbe9972d3e3c682621c8b6ddf338ffd2f8a872ca)
2025-06-26 17:05:20 +02:00
Štěpán Balážik
85df35c6a3 Hoist the artifact handling to the &system_test_common anchor
In the past artifacts of different types of system test jobs were
treated differently but this is no longer the case.

(cherry picked from commit c61ff639b3a5aa7d4513efdc893aadff95a56c60)
2025-06-26 15:17:09 +02:00
Štěpán Balážik
57b343c624 Add a check for existence and sanity of the junit.xml file
And use if after system tests are run using pytest.

(cherry picked from commit dfd6097f7bb573dfa9e713149d33e6d9b92e3e99)
2025-06-26 15:14:06 +02:00
Michal Nowak
bad04f74a5 [9.20] chg: ci: Disable Kerberos in tumbleweed
In the tumbleweed image, we utilize LibreSSL. Several BIND 9 libraries
are linked against LibreSSL's libcrypto.so.55, and when Kerberos is
enabled, we link against libk5crypto.so.3, which in turn links against
OpenSSL's libcrypto.so.3. This might theoretically lead to a symbol
conflict.

Closes #5394

Backport of MR !10643

Merge branch 'backport-5394-disable-kerberos-in-tumbleweed-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10651
2025-06-26 13:36:58 +02:00
Michal Nowak
511f609481
Disable Kerberos in tumbleweed
In the tumbleweed image, we utilize LibreSSL. Several BIND 9 libraries
are linked against LibreSSL's libcrypto.so.55, and when Kerberos is
enabled, we link against libk5crypto.so.3, which in turn links against
OpenSSL's libcrypto.so.3. This might theoretically lead to a symbol
conflict.

(cherry picked from commit 1b2c191bed4097e1095de3bc2f3854b6db894a8e)
2025-06-26 13:01:24 +02:00
Michal Nowak
b5a407b535 [9.20] chg: doc: Make empty changelog fatal error
The prep_doc_mr.py script of the bind9-qa repo needs a way to know that
gitchangelog.py did not produce entries. In the case of release notes,
it dies with "No commits matching given revlist". For changelog entries
it used to warn about "Empty changelog", but did not return non-zero
exit code.

Backport of MR !10591

Merge branch 'backport-mnowak/make-empty-changelog-fatal-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10641
2025-06-25 14:50:41 +02:00
Michal Nowak
5fa13bedf5 Make empty changelog fatal error
The prep_doc_mr.py script of the bind9-qa repo needs a way to know that
gitchangelog.py did not produce entries. In the case of release notes,
it dies with "No commits matching given revlist". For changelog entries
it used to warn about "Empty changelog", but did not return non-zero
exit code.

(cherry picked from commit 4d0ae4068f07a0f1a62b11629d3f26d798bddb45)
2025-06-25 12:08:14 +00:00
Michal Nowak
997b443d77 new: ci: Add GNU Make --shuffle option
GNU Make 4.4 introduced the --shuffle option to randomize the order of
goal targets and prerequisites. This helps detect hidden dependencies
and improve build robustness by exposing order-related issues during
parallel builds.

See:

    https://trofi.github.io/posts/238-new-make-shuffle-mode.html
    https://www.gnu.org/software/make/manual/html_node/Options-Summary.html#index-_002d_002dshuffle

Merge branch 'mnowak/add-gnu-make-shuffle-options' into 'bind-9.20'

See merge request isc-projects/bind9!10460
2025-06-25 13:58:11 +02:00
Michal Nowak
2fd72f10d2 Add GNU Make --shuffle option
GNU Make 4.4 introduced the --shuffle option to randomize the order of
goal targets and prerequisites. This helps detect hidden dependencies
and improve build robustness by exposing order-related issues during
parallel builds.

See:

    https://trofi.github.io/posts/238-new-make-shuffle-mode.html
    https://www.gnu.org/software/make/manual/html_node/Options-Summary.html#index-_002d_002dshuffle
2025-06-25 13:57:07 +02:00
Petr Špaček
7cc623ece1 [9.20] fix: test: Do not rely on failure in default configuration
Backport of MR !10631

Merge branch 'backport-main-systemtest-cpu-hang-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10638
2025-06-25 11:37:32 +00:00
Petr Menšík
a741244bc4 Do not expect fail in cpu test default configuration
Previous CPU test relied on either missing default named.conf or the
missing permissions to write into its default directory. In short that
default configuration would be unusable with current user. It would hang
indefinitely at cpu test if the named user could write into directory
specified in default configuration.

Change it instead to explicitly try non-existent configuration file.
It will still fail immediately, but will not rely on running user or
presence of file at default configuration file path.

(cherry picked from commit 8e789ea62f882cc3f1308de16dd3ca22ef0f8f04)
2025-06-25 11:36:35 +00:00