Vasek Sraier [Thu, 9 Jun 2022 20:12:38 +0000 (22:12 +0200)]
manager: replaced Click with argparse to "solve" issues with encoding
Click is refusing to run in environments with misconfigured locale and default encoding.
https://click.palletsprojects.com/en/8.1.x/unicode-support/
Refusing to run might make sense for CLI utility, but not for a service which is not properly interactive.
- implemented sd_notify and changed manager service type to "notify"
- fixed release configuration
- renamed knot-resolver-manager.service to knot-resolver.service
Vladimír Čunát [Wed, 15 Jun 2022 08:46:19 +0000 (10:46 +0200)]
adapt to libknot 3.2 lower-casing knot_pkt_qname()
Our strategy was (and remains) that the in-header QNAME is overwritten
in-place, so most of our code was already (correctly) assuming that
knot_pkt_qname() returns lower-case only. That simplifies this commit.
Vladimír Čunát [Mon, 27 Jun 2022 08:37:13 +0000 (10:37 +0200)]
ci/pkgtest: switch bad LXC builds to manual start
We've been unable to progress with these failures for some time,
and it's not good to have them red in CI all the time.
Manual start should allow easier testing of future fixes,
without doing the futile runs automatically.
Oto Šťáva [Wed, 13 Jul 2022 06:21:48 +0000 (08:21 +0200)]
ci: confine docker and macOS jobs to main repository
Some of our CI jobs use project-specific GitLab runners (e.g. requiring
the `dind` tag). The jobs then fail when someone forks the repository
and opens a merge request. This commit confines those jobs to the
`knot/knot-resolver` repository.
Vasek Sraier [Fri, 24 Jun 2022 15:20:00 +0000 (17:20 +0200)]
manager: remove systemd support
Why? Because it is dangerous to use. You'd have to run manager with root privileges
to be able to spawn systemd services via DBus. There is an option to do the same
with session instances of systemd, but that is unpackageable and pretty much unusable
in production. We will therefore rely on supervisord, as it's support got much better
recently.
Oto Šťáva [Thu, 23 Jun 2022 08:14:58 +0000 (10:14 +0200)]
daemon/tls: fix a double-free for some cases of policy.TLS_FORWARD
The double-free may have happened in some cases when the upstream
resolver was stopped while answering a forwarded query. I was reliably
reproducing it by running resperf on two kresd instances with one forwarded
to the other, and killing the upstream one.
Vladimír Čunát [Thu, 16 Jun 2022 08:12:22 +0000 (10:12 +0200)]
modules/priming: don't warn against unloading it
I can't see sufficient motivation here. The cache will be slightly
less ready, but it's not often that you need to contact a root server.
Most importantly, kresd must work well anyway, even with empty cache.
Also, the compiled-in address set of root servers should be quite
accurate - the NS set has never changed, and the last address change
was five years ago with just one of 26 records changing.
Vasek Sraier [Fri, 17 Jun 2022 13:03:43 +0000 (15:03 +0200)]
made supervisord sd_notify() plugin properly functional + supervisord config changes
- X-SUPERVISORD-TYPE=notify in a process's environment should make the process behave similarly to Type=notify systemd service units
- startsec with the above means time, after which it will get killed without ready notification
Vasek Sraier [Wed, 25 May 2022 13:03:14 +0000 (15:03 +0200)]
manager: experimental implementation of supervisord extension to support sd_notify()
contains:
- python module written in C, because Python does not support socket auxiliary messages like SCM_CREDENTIALS
- XML-RPC extension for supervisord, which actually does not do anything except for injecting code into supervisord internals
Oto Šťáva [Fri, 17 Jun 2022 08:57:58 +0000 (10:57 +0200)]
daemon/http: improve URI checks
The `check_uri()` function now only checks that the endpoint is either
`/doh` or `/dns-query`. Parameter checks were moved into
`process_uri_path()` so that the check only takes place for GET
requests. POST requests now do not care about parameters at all.