Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2015 11:39:57 +0100
From:      Andrea Venturoli <ml@netfence.it>
To:        questions@freebsd.org
Subject:   named and jail startup race condition
Message-ID:  <563C837D.1020608@netfence.it>

next in thread | raw e-mail | index | archive | help
Hello.

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       { 127.0.0.1; 127.0.1.1; ...}

127.0.0.1 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 
interface).



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
	av.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?563C837D.1020608>