Hello,
On 02. 09. 19 11:46, Milan Jeskynka Kazatel wrote:
Hello,
Could someone help me to understand the behavior of Knot Resolver?
Can I somehow process a change in the list of static records for knot
resolver like a command for reloading configuration?
If I have in the kresd.conf file a module
modules = {
'hints> iterate', - Add static records to resolver
...
...
and the list is located
- Load static records
hints.add_hosts ('/ etc / knot-resolver / static_records.txt')
how can I reload the change in the static_records.txt list for the kresd
@ 1 service
Or should I always restart the daemon kresd @ 1
systemctl restart Kresd @ 1
Here are multiple options:
a) If you do not require zero-downtime then you can simply restart
kresd@1 instance:
systemctl restart kresd@1
b) If you require zero-downtime and have only single kresd instance you
can do this:
systemctl start kresd@2
systemctl restart kresd@1
systemctl stop kresd@2
Please note the numbers at the end!
These commands start second (temporary) Knot Resolver instance with new
config and then restart the old instance with old config. During restart
the second instance will handle incomming DNS queries. After this
exercise the second instance is not needed and can be stopped.
c) If you require zero-downtime and have more than one kresd instance
you can simply restart instances one after the other:
systemctl restart kresd@1
systemctl restart kresd@2
systemctl restart kresd@3
...
In general we recommend having at least two instances running because it
allows to handle fatal errors (like crash) by automatic restart - and
clients will likely not notice anything.
I hope it helps.
--
Petr Špaček @ CZ.NIC