Date: Thu, 6 Jan 2011 18:34:56 -0800 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: grarpamp <grarpamp@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: NFS - DNS fail stops boot in mountlate Message-ID: <20110107023456.GA4988@icarus.home.lan> In-Reply-To: <AANLkTin2L=sfBSo3V3sA_7FfDBpnadc8PYnaSMwPJrcG@mail.gmail.com> References: <AANLkTimeRfTO4RT0M5%2Bx28OGM0cCXTMY=VADR1ZEdKeW@mail.gmail.com> <4D2663AE.2080805@FreeBSD.org> <AANLkTin2L=sfBSo3V3sA_7FfDBpnadc8PYnaSMwPJrcG@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110107023456.GA4988>