These are chat archives for CZ-NIC/knot-resolver

7th
Feb 2017
Andreas Rammhold
@andir
Feb 07 2017 18:35
@petzah i guess you figured it out by now but this is how I do it: https://gist.github.com/andir/d2c33f931d39894fd4a49a8a0efe0d00
Peter
@petzah
Feb 07 2017 18:44
@andir Yes, but even with such config there is an issue with restarting daemon. (systemctl restart kresd.service won't work due to "unit kresd.service may be requested by dependency only" and systemctl restart kresd.socket won't work either because once it is stopped kresd daemon will bind to the interfaces insted of systemd)
try this:
Andreas Rammhold
@andir
Feb 07 2017 18:45
i usually stop kresd.service after reloading the daemon, config changes to kresd will be picked up due to it being restarted on the next request
Peter
@petzah
Feb 07 2017 18:47
  1. nc -v localhost 53
  2. systemctl restart kresd.socket
first is to activate daemon , second will try to stop and start kresd.socket
when socket is down, kresd will bound to the interfaces (verify with netstat -natp |grep 53)
Andreas Rammhold
@andir
Feb 07 2017 18:48
i never stop the socket
Peter
@petzah
Feb 07 2017 18:49
I see
Andreas Rammhold
@andir
Feb 07 2017 18:50
and if I do I turn kresd off before, withdraw anycast annoucements etc..
Peter
@petzah
Feb 07 2017 18:51
so for configuration (e.g. adding new options to kresd.conf) you just do systemctl stop kresd.service
Andreas Rammhold
@andir
Feb 07 2017 18:51
yes
so (at least I think) no request will be lost but the service restarted
Peter
@petzah
Feb 07 2017 18:51
ok, well this will confuse a lot of people
thanks for help :)
Andreas Rammhold
@andir
Feb 07 2017 18:55
yw, I saw your ansible repo.. I'll probably give it a try on my private infrastructure :-)
Peter
@petzah
Feb 07 2017 18:56
sure, it's not complete and approach is somehow different, also templates have a lot of duplicate code .. but it works for me right now :) fork and enjoy :)