adding zone forwards without restart

Tony Finch dot at dotat.at
Fri Sep 30 14:17:33 UTC 2016


> On 29.09.16 12:25, Frank Even wrote:
> > I am running chrooted.  I'm relying on the "feature" of BIND "mounting" the
> > standard dirs into a chroot via the standard startup scripts in Cent6/7.

Aha, I should have actually read setup-named-chroot.sh rather than
assuming that it copied the files...

> > My understanding is it's not "copying" the files anywhere, but using those
> > that are there.  I am modifying them via puppet on the system.  I've even
> > created a "service" to only do an "rndc reconfig" instead of refreshing the
> > service to ensure I can do safe puppet runs.  But yeah, no matter what I
> > do, nothing short of a restart of the service (typically "service named
> > restart" on EL6 and "service named-chroot restart" on EL7) works.

Hmm, so it is doing a mount --bind of named.conf (the file itself), so
maybe the problem is that

(1) puppet is renaming the new named.conf into place, rather than
overwriting the old named.conf.

(2) after the rename, the bind mount continues to refer to the old file

# echo spong >test
# cat test
spong
# cat >mount
# mount --bind test mount
# cat mount
spong
# echo bling >test2
# mv test2 test
# cat mount
spong

(3) you have to remount all the config files in order for rndc reload to
work, and restarting the service causes this to happen

So you might find that it makes sense to update the config file in place,
along the lines of `cat <named.conf.new >named.conf`.

Or you might decide that it makes more sense to do your own chroot setup
and ditch Red Hat's clever-clever but half-broken attempt.

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/  -  I xn--zr8h punycode
Faeroes, Southeast Iceland: Northerly 4 or 5, occasionally 6 at first,
becoming variable 3 or 4, then becoming westerly or southwesterly 4 or 5
later. Moderate or rough. Showers. Good.


More information about the bind-users mailing list