Vladimír Čunát [Thu, 22 Dec 2022 12:58:53 +0000 (13:58 +0100)]
predict: fully deactivate prediction with `period = 0`
That setting is recommended by documentation but it would still leave
the timer triggering repeatedly. Maybe it didn't cause any practical
difference, but it was unnecessary and possibly confusing.
Vladimír Čunát [Thu, 14 Jul 2022 08:53:27 +0000 (10:53 +0200)]
TTL bounds: improve the logic
- apply to first (uncached) answer already
- don't extend over signature validity
Nit: the tests were using too high TTL (RFCs disallow the "sign bit").
It was working because (manual) cache-insertion was applying bounds,
but now the bounds don't get applied anymore, so it would fail.
Vladimír Čunát [Mon, 28 Feb 2022 18:10:16 +0000 (19:10 +0100)]
lib/cache: tweak TTL computation for packets
When a whole packet is cached (instead of individual RRs),
let's simplify the way the packet's TTL gets computed.
The previous mechanism came from commit 5b383a2bb7,
probably a misunderstanding of:
https://datatracker.ietf.org/doc/html/rfc2308#section-5
Anyway, I see no motivation to do it, and this way we should
get rid of some weird cases where we might extend TTL of some records,
except if they were below the cache.min_ttl() setting (5s default).
Vasek Sraier [Mon, 14 Nov 2022 10:09:19 +0000 (11:09 +0100)]
manager: masive API and modelling updates
- got rid of ParsedTree class because it did too many things at once
- introduced Renamed family of data structures (RenamedList, RenamedDict)
- split out etag generation into standalone procedure
- split out query() into standalone procedure
- modelling: changed BaseSchema to NoRenameBaseSchema, which works on normal dicts and lists (no ParsedTree dependency)
- modelling: introduced new BaseSchema (for backwards compatibility) which uses Renamed wrappers to handle configuration renaming
- added json pointer implementation (https://www.rfc-editor.org/rfc/rfc6901)
- API:
- got rid of QueryTree class as it was too complicated
- completely rewrote query() to use JSON pointer and JSON Patch (https://datatracker.ietf.org/doc/html/rfc6902/)
Vladimír Čunát [Fri, 7 Oct 2022 12:06:41 +0000 (14:06 +0200)]
add option to link sbin/kresd to jemalloc
And by default do so iff jemalloc is found.
I chose the simplicity of adding the chosen allocator just
in the single binary. Other sbin/* don't matter really,
and dynamic libs (e.g. modules) will just follow whoever loaded them.
Vladimír Čunát [Mon, 21 Nov 2022 11:52:55 +0000 (12:52 +0100)]
ci/images: drop the LXC images
Last use case was dropped in 36b08eb30387,
and I don't expect we'd use this in future anymore.
The "bullseye" in README was clearly a typo (it's the codename for 11).
Vladimír Čunát [Wed, 26 Oct 2022 16:45:21 +0000 (18:45 +0200)]
ci: make jobs interruptible by default
We're usually not interested in CI on older commits,
and this default will help cancelling expensive respdiff jobs.
Also add default runner tags to make them less likely
to get underspecified. For example, each job should choose
one option in the docker/lxc and amd64/arm64 pairs.
Vladimír Čunát [Wed, 26 Oct 2022 15:55:35 +0000 (17:55 +0200)]
ci pytests: migrate away from LXC runner
This reverts commit 15c1353544be, with some modifications.
On LXC we've had issues with
FileExistsError: [Errno 17] File exists: '/tmp/pytest-kresd-portdir'
.. which disappear with this commit. (I don't know how/why.)
Vladimír Čunát [Wed, 26 Oct 2022 10:07:09 +0000 (12:07 +0200)]
distro deb: add python3-dev dependency
Otherwise it's possible to end up with an error (e.g. Ubuntu 22.04):
knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:2:10:
fatal error: Python.h: No such file or directory
Vladimír Čunát [Thu, 27 Oct 2022 15:31:07 +0000 (17:31 +0200)]
doc XDP: update the list of required capabilities
We're the same as knotd in this; it evolved a bit
with libknot and kernel versions. Taken from:
https://www.knot-dns.cz/docs/3.2/singlehtml/#mode-xdp-pre-requisites
Oto Šťáva [Thu, 20 Oct 2022 11:06:31 +0000 (13:06 +0200)]
daemon/network: fix heap-buffer-overflow in endpoint key generation
Reproducible by listening on an interface by name, ASAN reports a
heap-buffer-overflow. This was a regression caused by !1286, which did
not account for null-terminators properly.