From owner-freebsd-questions@freebsd.org Fri Nov 6 13:21:42 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19844A26A7A for ; Fri, 6 Nov 2015 13:21:42 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 041481D0C for ; Fri, 6 Nov 2015 13:21:42 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: by mailman.ysv.freebsd.org (Postfix) id 02C6EA26A79; Fri, 6 Nov 2015 13:21:42 +0000 (UTC) Delivered-To: questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01664A26A78 for ; Fri, 6 Nov 2015 13:21:42 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9943C1D0B for ; Fri, 6 Nov 2015 13:21:41 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id tA6D18vn011502; Fri, 6 Nov 2015 13:01:08 GMT (envelope-from freebsd@qeng-ho.org) Subject: Re: named and jail startup race condition To: Andrea Venturoli , questions@freebsd.org References: <563C837D.1020608@netfence.it> From: Arthur Chance Message-ID: <563CA494.7030101@qeng-ho.org> Date: Fri, 6 Nov 2015 13:01:08 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563C837D.1020608@netfence.it> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 13:21:42 -0000 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.