Validating named configuration files before "reload"?

Bill Larson wllarso at swcp.com
Sat Nov 20 20:51:15 UTC 1999


This thread may be a little old now, but...

I agree that it would be nice to have a means to check the config file,
a zone files, prior to sending a "ndc reload" (shouldn't use kill -HUP
with the newer BINDs).

How about starting up a second copy of named using a different port and
then watching your syslog output for errors.  (Can the port number be
specified in the config file?  For that matter, can you still specify
an alternate port on the command line?)  When everything is correct,
then you can restart the real one.

This idea would have some "gotchas" to work out before using.  For
example, how would you control the second version of named?  ndc won't
work with two copies (I don't think).  The pid of the resulting daemon
is saved in /var/run/named.pid, and the second execution would
overwrite the first.  If changes were made to the configuration file to
get a temporary check version of named running, how would you insure
that the changes are simple to put in, and back out?  (Maybe a simple
include directive?)

I think that the original question was quite good, and it is something
that would be worthwhile addressing.

Just an idea,

Bill Larson (wllarso at swcp.com)

> Is there a simple way to validate the named.conf file and all included
> files?
> 
> The reason is quite simple, when doing a "bind reload" we'd like to
> validate the configuration files before sending a "kill -HUP" to bind
> process.  If the validation fails, the "kill -HUP" would not be send
> to bind process and some error would print in the stderr.


More information about the bind-users mailing list