named and jail startup race condition

Arthur Chance freebsd at qeng-ho.org
Fri Nov 6 13:21:42 UTC 2015


On 06/11/2015 10:39, Andrea Venturoli wrote:
> 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.

I presume that should have been 127.0.1.1

>
> 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?

That's what I do, otherwise if you have more than one jail which one 
creates the interface?

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

-- 
Moore's Law of Mad Science: Every eighteen months, the minimum IQ
necessary to destroy the world drops by one point.


More information about the freebsd-questions mailing list