Created attachment 497358 [details] /etc/init.d/unbound I think there should be an option to preserve the cache during restarts, especially on configurations with large memory cache. This can be achieved with the dump_cache and load_cache commands to unbound-control: dump_cache The contents of the cache is printed in a text format to stdout. You can redirect it to a file to store the cache in a file. load_cache The contents of the cache is loaded from stdin. Uses the same format as dump_cache uses. Loading the cache with old, or wrong data can result in old or wrong data returned to clients. Load- ing data into the cache in this way is supported in order to aid with debugging. I've attached an uppdated unbound init.d file with dump_cache and load_cache added. I also added a --nicelevel which checks the UNBOUND_NICELEVEL= from /etc/conf.d/unbound
Created attachment 497360 [details, diff] /etc/init.d/unbound.diff Added diff of original /etc/init.d/unbound and modified version.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76a0fe9aa1906a7bbe192efb56ef8335d21b9a3c commit 76a0fe9aa1906a7bbe192efb56ef8335d21b9a3c Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2018-09-14 22:00:12 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2018-09-14 22:03:47 +0000 net-dns/unbound: runscript rewritten - "need net" changed to "use net". If you need to bind service to a specific interface or address add 'rc_need="<interface>"' in /etc/conf.d/<unbound>. - Use "/run" instead of "/var/run". - Verify daemon is really up and running. - It is now possible to pass any by start-stop-daemon supported arguments to start-stop-daemon. - It is now possible to preserve unbound's cache. [Bug 632644] Closes: https://bugs.gentoo.org/632644 Package-Manager: Portage-2.3.49, Repoman-2.3.10 net-dns/unbound/files/unbound-r1.confd | 36 +++++++++ net-dns/unbound/files/unbound-r1.initd | 137 ++++++++++++++++++++++++++++++++ net-dns/unbound/unbound-1.7.3-r1.ebuild | 6 +- net-dns/unbound/unbound-1.8.0-r1.ebuild | 11 ++- 4 files changed, 184 insertions(+), 6 deletions(-)