PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.67k stars 907 forks source link

add a "reload" for systemd #3896

Open Sylvain303 opened 8 years ago

Sylvain303 commented 8 years ago

under debian jessie:

packages, from debian repository

pdns_server --version
May 24 19:18:07 PowerDNS Authoritative Server 3.4.1 (jenkins@autotest.powerdns.com) (C) 2001-2014 PowerDNS.COM BV
May 24 19:18:07 Using 64-bits mode. Built on 20151208035023 by root@binet.debian.org, gcc 4.9.2.
May 24 19:18:07 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
May 24 19:18:07 Features: botan1.10 cryptopp libdl lua 
May 24 19:18:07 Built-in modules: 

Running from command line:

systemctl reload pdns.service

produces

Failed to reload pdns.service: Job type reload is not applicable for unit pdns.service.

But debian jessie has a reload (in /etc/init.d/pdns):

service pdns reload

producing

[ ok ] Reloading PowerDNS Authoritative Name Server: pdns.

Discovered by salting powerdns, this is failing on debian jessie with default provider systemd:

salt-call -ldebug service.reload pdns

As mentioned: pdns-server only supports reload for a small fraction of the config file. So for the moment a restart seems a good solution for managed config file.

So, may be a solution could be to map reload to restart.

Or simply do the equivalent of pdns_control reload.

To be discussed.

pieterlexis commented 8 years ago

as noted on IRC, pdns_control reload will not actually reload the config, but will tell the backends to reload. For the BIND backend, this means checking and possibly reloading its zones, the luabackend will reload its lua script and the gSQL backends do nothing.

I think the suggestion to alias reload to restart is a good one, as that will do what the user expects (load the new configuration). I would like to have config check beforehand, but that doesn't exist yet.

Sylvain303 commented 8 years ago

+1 for config check. but not related to the ticket. ;)

Habbie commented 7 years ago

Is this still an issue in our own 4.x packaging?

dje4om commented 4 years ago

+1 for config check & reload