named and jail startup race condition

Andrea Venturoli ml at
Fri Nov 6 10:40:09 UTC 2015


Let's suppose that on a 9.3 system I set up a jail (through ezjails if 
it matters and as described in the handbook) and configure it to resolve 
through named from base system.

In base's /etc/named/named.conf I have
 > listen-on       {;; ...} is lo1's address, which is the interface/IP of the jail.

A problem arises since named starts before ezjail, so lo1 is not yet 
configured and it cannod bind to that interface.
After a reboot, name resolution inside the jail won't work until I 
restart named (which will then be able to bind to the, now existent, lo1 

I wonder what are the best practices to overcome this issue:
_ change named rc.d script, so it starts after ezjail (doesn't seem a 
good idea to me)?
_ preconfigure lo1 in rc.conf?
_ ...

Or, maybe, I'm doing it all wrong and there is a better way?

  bye & Thanks

More information about the freebsd-questions mailing list