From 5c16c31e067573616feda611858f742777af0555 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Tue, 3 Nov 2020 13:41:00 +0100 Subject: [PATCH] nixos/unbound: add release notes for the changes that were introduced As part of this patch series a few changes have been made to the unbound serivce the deserve proper documentation. --- nixos/doc/manual/release-notes/rl-2103.xml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index 85eedfe0ec7..da20c9e8067 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -140,6 +140,62 @@ All services should use or StartLimitIntervalSec in instead. + + + The Unbound DNS resolver service (services.unbound) has been refactored to allow reloading, control sockets and to fix startup ordering issues. + + + + It is now possible to enable a local UNIX control socket for unbound by setting the + option. + + + + Previously we just applied a very minimal set of restrictions and + trusted unbound to properly drop root privs and capabilities. + + + + As of this we are (for the most part) just using the upstream + example unit file for unbound. The main difference is that we start + unbound as unbound user with the required capabilities instead of + letting unbound do the chroot & uid/gid changes. + + + + The upstream unit configuration this is based on is a lot stricter with + all kinds of permissions then our previous variant. It also came with + the default of having the Type set to notify, therefore we are now also + using the unbound-with-systemd package here. Unbound will start up, + read the configuration files and start listening on the configured ports + before systemd will declare the unit active (running). + This will likely help with startup order and the occasional race condition during system + activation where the DNS service is started but not yet ready to answer + queries. Services depending on nss-lookup.target or unbound.service + are now be able to use unbound when those targets have been reached. + + + + Aditionally to the much stricter runtime environmet the + /dev/urandom mount lines we previously had in the code (that would + randomly failed during the stop-phase) have been removed as systemd will take care of those for us. + + + + The preStart script is now only required if we enabled the trust + anchor updates (which are still enabled by default). + + + + Another benefit of the refactoring is that we can now issue reloads via + either pkill -HUP unbound and systemctl reload unbound to reload the + running configuration without taking the daemon offline. A prerequisite + of this was that unbound configuration is available on a well known path + on the file system. We are using the path /etc/unbound/unbound.conf as that is the + default in the CLI tooling which in turn enables us to use + unbound-control without passing a custom configuration location. + +