Bugzilla – Bug 193
nsd.conf not reloaded on nsdc reload
Last modified: 2009-06-22 09:48:54 CEST
Adding a new zone to nsd.conf, running nsdc rebuild and nsdc reload results in
Jul 8 15:36:34 www nsd: signal received, reloading...
Jul 8 15:36:34 www nsd: corrupted database/bad config, zone example.com. in db /var/db/nsd.db, but not in config file. Cannot load database. Please rebuild database and start again.
Jul 8 15:36:34 www nsd: unable to reload the database: Interrupted system call
My personal opinion is that if you change the configuration, you should restart the program (by invoking nsdc restart, for example).
However, many dns people from labs are on vacation, so I should discuss this when they get back. Until then: use rebuild/restart instead of rebuild/reload.
(In reply to comment #1)
> My personal opinion is that if you change the configuration, you should restart
> the program (by invoking nsdc restart, for example).
Using restart is fine for me as well. I filled this as bug as I was asked about this behavior (and a possible regression compared to 2.x). The diagnostic message in syslog is misleading at least.
Also in the future, NSD will not reload nsd.conf after invoking a NSD reload. The reason is that we like to keep NSD code clean and one of the ways to do so is to keep file processing and server activities seperate.
If you add or remove zones, you should continuing using nsdc restart instead of reload (as suggested in the logs).
(In reply to comment #3)
> If you add or remove zones, you should continuing using nsdc restart instead of
> reload (as suggested in the logs).
As I said, this is fine with me. But in that case the log message should be changed to say something like "corrupted database / modified configuration, explicitly restart the daemon" or so. As it is, the message is misleading as the database is not corrupt (it was just rebuild) and the configuration file is valid as well.
IMHO the confusing aspect of nsdc's behaviour is that it's providing actions with init script names, but they're behaving differently. "Reload" typically implies a full reload of the configuration files without any downtime.
See, for example:
So really a NSD init script shouldn't alias "reload" to "nsdc reload" since it doesn't "cause the configuration of the service to be reloaded." It's actually a bug in the init scripts though, since nsdc can use the "reload" action to mean whatever you want. From what I've seen though almost all of the packaged versions of NSD pass start/stop/restart/reload from the init scripts directly to nsdc. Examples:
NSD init scripts should really skip the "reload" action and make "force-reload" and "restart" invoke nsdc rebuild && nsdc restart.
I would like to invite you to discuss this on our nsd users mailing list. This way, we can check if more NSD users feel the same way and if it is worth to make such a change that would make nsdc more conform the init script names.
Please do not hesitate and bring the discussion to nsd-users@NLnetLabs.nl!
*** Bug 241 has been marked as a duplicate of this bug. ***
*** Bug 257 has been marked as a duplicate of this bug. ***