Commit Graph
41897 Commits
Author SHA1 Message Date
Aram Sargsyan 4123d59fbc Add a missing rcu_read_unlock() call on exit path
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.
2024-09-27 13:48:33 +00:00
Ondřej Surý 62c49db973 dev: Add full Alessio's name to .mailmap to fix some of the older commits
Merge branch 'ondrej/add-alessio-to-.mailmap' into 'main'

See merge request isc-projects/bind9!9557
2024-09-26 11:48:16 +00:00
Ondřej Surý 1bc9eb0fc8 Add full Alessio's name to .mailmap to fix some of the older commits 2024-09-26 11:48:02 +00:00
Ondřej Surý f48b86871f chg: usr: Honour the Control Group memory contraints on Linux
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.

Merge branch 'ondrej/use-uv_get_available_memory-doc' into 'main'

See merge request isc-projects/bind9!9556
2024-09-26 11:20:14 +00:00
Ondřej Surý 37552ce9ae Document that we now honour the cgroup memory limit
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.
2024-09-26 12:55:11 +02:00
Mark Andrews d0d4c6dae7 new: usr: Added WALLET type
Add the new record type WALLET (262).  This provides a mapping from a domain name to a cryptographic currency wallet.  Multiple mappings can exist if multiple records exist.

Closes #4947

Merge branch '4947-add-wallet-type-to-named' into 'main'

See merge request isc-projects/bind9!9521
2024-09-25 12:03:45 +00:00
Mark Andrews 9b358e6e8b Add examples of WALLET records 2024-09-25 10:32:38 +00:00
Mark Andrews b919b9b4f3 Add the new record type WALLET (262)
This provides a mapping from a domain name to a cryptographic
currency wallet and is a clone of TXT.
2024-09-25 10:32:38 +00:00
Arаm Sаrgsyаn 4498c0216f fix: usr: Fix the 'rndc dumpdb' command's error reporting
The 'rndc dumpdb' command wasn't reporting errors which
occurred when starting up the database dump process by named,
like, for example, a permission denied error for the
'dump-file' file. This has been fixed. Note, however, that
'rndc dumpdb' performs asynchronous writes, so errors can
also occur during the dumping process, which will not be
reported back to 'rndc', but which will still be logged by
named.

Closes #4944

Merge branch '4944-rndc-dumpdb-do-not-ignore-errors' into 'main'

See merge request isc-projects/bind9!9547
2024-09-25 09:07:46 +00:00
Aram Sargsyan 63bddd7192 Test 'rndc dumpdb' with an unwritable dump-file
Check that with a preexisting dump file without a write permission
no actual dump happens, and rndc returns an error result.

Also add a couple of missing entries in the cleaning script.
2024-09-25 08:02:17 +00:00
Aram Sargsyan 8b866ba8a0 Do not ignore named_server_dumpdb() result code
The named_server_dumpdb() function, which is called when a 'rndc dumpdb'
command is issued, returns a 'isc_result_t' result code and it has been
always ignored since its introduction in
eb8713ed94, where it was still called
ns_server_dumpdb(). The orignal reasoning is not preserved, but it could
have been also a simple copy-paste mistake, as there are commands, which
return 'void' and require manually setting 'result = ISC_R_SUCCESS;', as
it was done here. Anyway, named will now return the actual result, and
'rndc' will report an error, when the 'dumpdb' command fails.
2024-09-25 08:02:17 +00:00
Nicki Křížek 812f0031bf chg: doc: Track changes in separate files
Keep the changelog for each version in a separate source file to avoid
rebase conflicts when handling the -S version.

---

Related !9528

Closes #4946

Merge branch 'nicki/reorganize-changelog-docfiles-9.21' into 'main'

See merge request isc-projects/bind9!9549
2024-09-24 14:12:29 +00:00
Nicki Křížek 3d49a10d78 Fix changelog entry for [GL #4759] 2024-09-24 16:11:08 +02:00
Nicki Křížek 49128fc173 Generate changelog to stdout
Since the changes aren't tracked in the single changelog.rst file,
generate the changelog to stdout instead, so it can be easily redirected
to the proper file.
2024-09-24 16:11:08 +02:00
Nicki Křížek f85a3e41aa Track changes in separate files
Keep the changelog for each version in a separate source file to avoid
rebase conflicts when handling the -S version.
2024-09-24 16:11:08 +02:00
Ondřej Surý aed7f552d5 chg: dev: Use libuv functions to get memory available to BIND 9
This change uses uv_get_available_memory() if available with fallback
to uv_get_constrained_memory() with fallback to uv_get_total_memory().

Merge branch 'ondrej/use-uv_get_available_memory' into 'main'

See merge request isc-projects/bind9!9527
2024-09-24 13:51:55 +00:00
Ondřej Surý 06e5ada4be Use libuv functions to get memory available to BIND 9
This change uses uv_get_total_memory() to get the memory available to
BIND 9 with possible modification by uv_get_constrained_memory() if the
libuv version is recent enough to honour constraints created by
f.e. cgroups.
2024-09-24 15:51:14 +02:00
Nicki Křížek 0d0d61ce3c chg: ci: Increase the load TCP/DoT shotgun perf tests
Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.

Merge branch 'nicki/increase-tcp-dot-shotgun-load' into 'main'

See merge request isc-projects/bind9!9494
2024-09-24 11:15:12 +00:00
Nicki Křížek e89afd3349 Increase the load TCP/DoT shotgun perf tests
Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.
2024-09-24 09:27:14 +02:00
Mark Andrews 467f9bf5c5 fix: test: Check read value in upforwd/ans4
The ans4 server wasn't shutting down cleanly sometimes.  Check that read returns the
expected value for the message length or exit read loop.

Closes #4301

Merge branch '4301-check-read-value-in-ans4' into 'main'

See merge request isc-projects/bind9!9537
2024-09-24 07:26:27 +00:00
Mark Andrews 21baad0a8f Check read value in upforwd/ans4
The ans4 server wasn't shutting down cleanly sometimes.  Check that
read returns the expected value for the message length or exit read
loop.
2024-09-24 05:33:06 +00:00
Michal Nowak 30b6ac4192 chg: test: Downgrade "timeout" and "attempts" arguments in shutdown
The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

Also, see isc-projects/bind9#4943.

Merge branch 'mnowak/shutdown-downgrade-timeout-and-attempts-arguments' into 'main'

See merge request isc-projects/bind9!9507
2024-09-23 15:39:16 +00:00
Michal Nowak 1c637e96d1 Print correct udp/tcp function name in generic_query() 2024-09-23 13:06:42 +00:00
Michal Nowak 463ab2f3f5 Downgrade "timeout" and "attempts" arguments in shutdown
The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.
2024-09-23 13:06:42 +00:00
Michal Nowak 59cce28320 chg: ci: Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

Validation jobs:
- [x] short - [#4756989](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4756989/artifacts/browse/output/ns4/) - 
- [x] long - [#4757196](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4757196/artifacts/browse/output/ns4/)

Merge branch 'mnowak/exclude-some-rpz-files-from-long-stress-tests-artifacts' into 'main'

See merge request isc-projects/bind9!9522
2024-09-23 11:20:10 +00:00
Michal Nowak 871eeed519 Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.
2024-09-23 11:19:35 +00:00
Ondřej Surý 59e85a022d chg: dev: Use uv_available_parallelism() if available
Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.

Merge branch 'ondrej/use-uv_available_parallelism-if-available' into 'main'

See merge request isc-projects/bind9!9524
2024-09-21 11:31:26 +00:00
Ondřej Surý 31458d405a Add support to read number of online CPUs on OpenBSD
The OpenBSD doesn't have sysctlbyname(), but sysctl() can be used to
read the number of online/available CPUs by reading following MIB(s):
[CTL_HW, HW_NCPUONLINE] with fallback to [CTL_HW, HW_NCPU].
2024-09-21 12:38:33 +02:00
Ondřej Surý 3a91c0a4e3 Cleanup the sysctlbyname and friends configure checks and ifdefs
Cleanup various checks and cleanups that are available on the all
platforms like sysctlbyname() and various related <sys/*.h> headers
that are either defined in POSIX or available on Linux and all BSDs.
2024-09-21 12:38:33 +02:00
Ondřej Surý 26e7358b16 Use uv_available_parallelism() if available
Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.
2024-09-21 12:38:33 +02:00
Ondřej Surý f0accc8f61 fix: usr: Fix long-running incoming transfers
Incoming transfers that took longer than 30 seconds would stop reading from the TCP stream and the incoming transfer would be indefinitely stuck causing BIND 9 to hang during shutdown.

This has been fixed and the `max-transfer-time-in` and `max-transfer-idle-in` timeouts are now honoured.

Closes #4949

Merge branch '4949-fix-ignored-and-invalid-dispatch-timeout-in-dns_xfrin' into 'main'

See merge request isc-projects/bind9!9531
2024-09-21 08:52:38 +00:00
Ondřej Surý 96ef98558c Don't enable timeouts in dns_dispatch for incoming transfers
The dns_dispatch_add() call in the dns_xfrin unit had hardcoded 30
second limit.  This meant that any incoming transfer would be stopped in
it didn't finish within 30 seconds limit.  Additionally, dns_xfrin
callback was ignoring the return value from dns_dispatch_getnext() when
restarting the reading from the TCP stream; this could cause transfers
to get stuck waiting for a callback that would never come due to the
dns_dispatch having already been shut down.

Call the dns_dispatch_add() without a timeout and properly handle the
result code from the dns_dispatch_getnext().
2024-09-21 10:15:47 +02:00
Ondřej Surý 0f810b3144 Modify dns_dispatch API to accept zero timeout
The dns_dispatch_add() has timeout parameter that could not be 0 (for
not timeout).  Modify the dns_dispatch implementation to accept a zero
timeout for cases where the timeouts are undesirable because they are
managed externally.
2024-09-21 10:15:37 +02:00
Ondřej Surý 1dd4310082 chg: ci: Update code formatting
Merge branch 'nicki/update-code-format' into 'main'

See merge request isc-projects/bind9!9533
2024-09-21 07:16:00 +00:00
Nicki KřížekandOndřej Surý 28d4e866c7 Ignore clang-format reformatting commit 2024-09-21 08:39:43 +02:00
Nicki Křížek 833ea7926c Fix arguments-renamed pylint issue in iscconf.py
The argument name was different in the base class.
2024-09-20 17:26:33 +02:00
Nicki Křížek ebb5bd9c0f Update code formatting
clang 19 was updated in the base image.
2024-09-20 17:26:33 +02:00
Nicki Křížek 28badd8ed4 chg: dev: Restore the number of threadpool threads back to original value
The issue of long-running operations potentially blocking query resolution has been fixed. Revert this temporary workaround and restore the number of threadpool threads.

Related #4898

Merge branch '4898-remove-workaround-and-note' into 'main'

See merge request isc-projects/bind9!9530
2024-09-20 14:47:24 +00:00
Nicki Křížek 9fc773ce4c Remove fixed known issue [GL #4898] 2024-09-20 14:31:57 +02:00
Nicki Křížek 842abe9fbf Revert "Double the number of threadpool threads"
This reverts commit 6857df20a4.
2024-09-20 14:31:25 +02:00
Nicki Křížek 958d306f52 chg: doc: Update sphinx to 7.4.7
Merge branch 'nicki/update-sphinx' into 'main'

See merge request isc-projects/bind9!9529
2024-09-20 12:02:32 +00:00
Nicki Křížek 3d65fa2740 Update sphinx to 7.4.7 2024-09-20 14:01:03 +02:00
Mark Andrews a4b9625196 new: usr: Log query response status to the query log
Log a query response summary using the new category `responses`.  Logging can be controlled by the option `responselog` and `rndc responselog`.

Closes #459

Merge branch '459-log-query-response-status' into 'main'

See merge request isc-projects/bind9!9449
2024-09-19 23:09:07 +00:00
Mark Andrews 452db02c19 Document 'responselog' in the ARM 2024-09-19 21:44:06 +00:00
Mark Andrews 61415432ec Check responselog behaviour
Extends the resolver system test to to check whether responses are
logged to the query log in addition to the queries.
2024-09-19 21:44:06 +00:00
Petr MenšíkandMark Andrews e6b19af2dd Move common flags logging to shared functions
Query and response log shares the same flags. Move flags logging out of
log_query to share it with log_response. Use buffer instead of snprintf
to fill flags a bit faster.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2024-09-19 21:44:06 +00:00
Petr MenšíkandMark Andrews 6f879aba65 Make responselog flags similar to querylog
Remove answer flag from log, log instead count of records for each
message section. Include EDNS version and few flags of response. Add
also status of result.

Still does not include body of responses rrset.
2024-09-19 21:44:06 +00:00
Evan HuntandMark Andrews c4b7dce376 Reduce code duplication
combined named_server_togglequerylog() and
named_server_toggleresponselog() into named_server_setortoggle().
2024-09-19 21:44:06 +00:00
Mark Andrews 5fad79c92f Log the rcode returned to for a query
Log to the querylog the rcode of a previous query using
the identifier 'response:' to diffenciate queries from
responses.
2024-09-19 21:44:06 +00:00
Evan Hunt 9ab6de22a5 chg: minor cleanup in qpcache
when the QP cache was adapted from the RBTDB, some variable names weren't changed, and still incorrectly reference the RBT.

Merge branch 'each-qpcache-nits' into 'main'

See merge request isc-projects/bind9!9515
2024-09-19 21:42:33 +00:00