From owner-freebsd-stable@FreeBSD.ORG Fri Jan 7 02:35:09 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613B5106564A for ; Fri, 7 Jan 2011 02:35:09 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 4597A8FC08 for ; Fri, 7 Jan 2011 02:35:08 +0000 (UTC) Received: from omta04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by qmta02.emeryville.ca.mail.comcast.net with comcast id sSah1f0040lTkoCA2Sb8Fq; Fri, 07 Jan 2011 02:35:08 +0000 Received: from koitsu.dyndns.org ([98.248.34.134]) by omta04.emeryville.ca.mail.comcast.net with comcast id sSb01f00F2tehsa8QSb1m6; Fri, 07 Jan 2011 02:35:02 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 85C8E9B422; Thu, 6 Jan 2011 18:34:56 -0800 (PST) Date: Thu, 6 Jan 2011 18:34:56 -0800 From: Jeremy Chadwick To: grarpamp Message-ID: <20110107023456.GA4988@icarus.home.lan> References: <4D2663AE.2080805@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: NFS - DNS fail stops boot in mountlate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 02:35:09 -0000 On Thu, Jan 06, 2011 at 09:19:06PM -0500, grarpamp wrote: > So what was unclear? > > mount_nfs emits a nonzero exit status upon failing to look > up an FQDN causing mountlate to trigger a dump to shell > on boot during rc processing. That's a *showstopper*. The > right thing to do is to hack mount_nfs to punt to background > mounting in this case with an appropriate exit status. > > Personally I'd distinguish mount_nfs exit codes between: > 0 - mounted > 1 - backgrounded, for any reason > 2 - none of the above > and adjust the rc's to deal with it accordingly. > > Words are subject to interpretation and take time. Though > perhaps masked by brevity, I believe all the above elements > were in the prior concise post. Thanks everybody :) So basically the problem is that the "bg" option in mount_nfs only applies to "network unreachable" conditions and not "DNS resolution failed" conditions. Initially I was going to refute the above request until I looked closely at the mount_nfs(8) man page which has the following clauses: For non-critical file systems, the bg and retrycnt options provide mechanisms to prevent the boot process from hanging if the server is unavailable. [...describing the "bg" option...] Useful for fstab(5), where the file system mount is not critical to multiuser operation. I read these statements to mean "if -o bg is used, the system should not hang/stall/fail during the boot process". Dumping to /bin/sh on boot as a result of a DNS lookup failure violates those statements, IMHO. I would agree that DNS resolution should be part of the bg/retry feature of "bg" in mount_nfs. How/whether this is feasible to implement is unknown to me. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |