From owner-freebsd-questions@freebsd.org Fri Nov 6 10:40:09 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 137E4A27965 for ; Fri, 6 Nov 2015 10:40:09 +0000 (UTC) (envelope-from ml@netfence.it) 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 F3E7A1DC7 for ; Fri, 6 Nov 2015 10:40:08 +0000 (UTC) (envelope-from ml@netfence.it) Received: by mailman.ysv.freebsd.org (Postfix) id F029BA27964; Fri, 6 Nov 2015 10:40:08 +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 EFC4AA27963 for ; Fri, 6 Nov 2015 10:40:08 +0000 (UTC) (envelope-from ml@netfence.it) Received: from smtp207.alice.it (smtp207.alice.it [82.57.200.103]) by mx1.freebsd.org (Postfix) with ESMTP id 8523A1DC6 for ; Fri, 6 Nov 2015 10:40:08 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.ventu (79.32.6.132) by smtp207.alice.it (8.6.060.28) (authenticated as acanedi@alice.it) id 562CAA6901F037F0 for questions@freebsd.org; Fri, 6 Nov 2015 11:39:54 +0100 Received: from alamar.ventu (alamar.ventu [10.1.2.18]) by soth.ventu (8.15.2/8.14.9) with ESMTP id tA6AdvbI077432 for ; Fri, 6 Nov 2015 11:39:57 +0100 (CET) (envelope-from ml@netfence.it) From: Andrea Venturoli Subject: named and jail startup race condition To: questions@freebsd.org Message-ID: <563C837D.1020608@netfence.it> Date: Fri, 6 Nov 2015 11:39:57 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 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 10:40:09 -0000 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.