From adam@veda.is  Fri Oct 25 18:00:52 1996
Received: from veda.is (root@ubiq.veda.is [193.4.230.60])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA10845
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Oct 1996 18:00:48 -0700 (PDT)
Received: (from adam@localhost) by veda.is (8.8.2/8.7.3) id BAA01567; Sat, 26 Oct 1996 01:00:37 GMT
Message-Id: <199610260100.BAA01567@veda.is>
Date: Sat, 26 Oct 1996 01:00:37 GMT
From: Adam David <adam@veda.is>
Reply-To: adam@veda.is
To: FreeBSD-gnats-submit@freebsd.org
Subject: mountd fails to export
X-Send-Pr-Version: 3.2

>Number:         1891
>Category:       bin
>Synopsis:       mountd fails to export
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 25 18:10:01 PDT 1996
>Closed-Date:    Fri Sep 12 09:37:44 PDT 1997
>Last-Modified:  Fri Sep 12 09:38:24 PDT 1997
>Originator:     Adam David
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
Veda Internet
>Environment:

	NFS

>Description:

	if one of the hostnames in /etc/exports is misspelt or fails to
	resolve due to a transient failure, the whole line is junked even
	when other hosts are specified and available. This also applies
	to hostnames included via netgroups.

>How-To-Repeat:

	assuming that "friendly" is a valid host on the local foo.com network

	foo# echo "/usr	friendly moo.cow" >exports.foo
	foo# mountd exports.foo
	foo# showmount -e
	Exports list on localhost:
	foo# echo "/usr friendly" >exports.foo
	foo# kill -HUP `cat /var/run/mountd.pid`
	foo# showmount -e
	Exports list on localhost:
	/usr                               friendly.foo.com
	foo#

>Fix:
	
	Skip the host instead of skipping immediately to the next line
	every time get_host() returns an error.

	or:

	Document that it is a requirement for all hosts in /etc/exports
	to be defined in /etc/hosts in order to prevent failed exports to
	reachable hosts.

	or:

	Document that it is advisable to separate host lists topologically
	into separate lines in /etc/exports
>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: adam@veda.is
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1891: mountd fails to export
Date: Sat, 26 Oct 1996 09:39:34 +0200 (MET DST)

 As Adam David wrote:
 
 > 	if one of the hostnames in /etc/exports is misspelt or fails to
 > 	resolve due to a transient failure, the whole line is junked even
 > 	when other hosts are specified and available.
 
 > >Fix:
 > 	
 > 	Skip the host instead of skipping immediately to the next line
 > 	every time get_host() returns an error.
 > 
 > 	or:
 > 
 > 	Document that it is a requirement for all hosts in /etc/exports
 > 	to be defined in /etc/hosts in order to prevent failed exports to
 > 	reachable hosts.
 > 
 > 	or:
 > 
 > 	Document that it is advisable to separate host lists topologically
 > 	into separate lines in /etc/exports
 
 I vote for 2 (and 3).  (Except, no reference to /etc/hosts, the valid
 hostname can also come from DNS.)
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)

From: Adam David <adam@veda.is>
To: joerg_wunsch@uriah.heep.sax.de
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1891: mountd fails to export
Date: Sat, 26 Oct 1996 12:13:40 +0000 (GMT)

 > > 	Document that it is a requirement for all hosts in /etc/exports
 > > 	to be defined in /etc/hosts in order to prevent failed exports to
 > > 	reachable hosts.
 > > 
 > > 	or:
 > > 
 > > 	Document that it is advisable to separate host lists topologically
 > > 	into separate lines in /etc/exports
 > 
 > I vote for 2 (and 3).  (Except, no reference to /etc/hosts, the valid
 > hostname can also come from DNS.)
 
 Or from NIS (sitewide /etc/hosts), but what if servers are temporarily
 unavailable? A whole line of hosts are then blocked from export until mountd
 is restarted (kill -HUP). The NFS server is not guaranteed access to DNS or
 NIS services, unless they are running on the same host and serving all domains
 that contain export hosts (because links can go down).
 
 --
 Adam David <adam@veda.is>

From: Adam David <adam@veda.is>
To: J Wunsch <j@uriah.heep.sax.de>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1891: mountd fails to export
Date: Mon, 11 Nov 1996 03:27:31 GMT

 > > >Fix:
 > > 	
 > > 	Skip the host instead of skipping immediately to the next line
 > > 	every time get_host() returns an error.
 > > 
 > > 	or:
 > > 
 > > 	Document that it is a requirement for all hosts in /etc/exports
 > > 	to be defined in /etc/hosts in order to prevent failed exports to
 > > 	reachable hosts.
 > > 
 > > 	or:
 > > 
 > > 	Document that it is advisable to separate host lists topologically
 > > 	into separate lines in /etc/exports
 > 
 > I vote for 2 (and 3).  (Except, no reference to /etc/hosts, the valid
 > hostname can also come from DNS.)
 > 
 > -- 
 > cheers, J"org
 > 
 > joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 
 Why is it such a good idea to discard the whole line (or netgroup) if only one
 host (of many) cannot be resolved? What is gained by preventing other valid
 hosts from being exported to?
 
 The single hostname may be invalid because of a removal of a single host from
 the network, or a rename of a single host. Why should all other hosts be denied
 service because hosts information changes in this limited way while the change
 has not been reflected in /etc/exports ?
 
 --
 Adam David <adam@veda.is>

From: David Alan Gilbert <gilbertd@cs.man.ac.uk>
To: freebsd-gnats-submit@freebsd.org, adam@veda.is
Cc:  Subject: Re: bin/1891: mountd fails to export
Date: Wed, 09 Apr 1997 13:52:27 +0100

 This is causing me real hastles.  We have a few hundred machines on the
 network and I admin one server and don't have admin privelidges outside
 the group; even though our server must export to everyone.
 
 Quite often a machine gets added to a netgroup but not the DNS or
 someone does a clear out and tidies up the DNS but doesn't clean the
 netgroup out - this shouldn't screw up all the other machines.
 
 To give you an idea of the scale of this problem when I first installed
 our FreeBSD server there were around 100 machines in the netgroup
 which were no longer in the DNS!
 
 Even on the basis of transient problems (you start mountd between
 someone updating netgroup and DNS) it is just not on for mountd to
 skip the entire line.
 
 I've written a a hack which works around it - but its a hack and
 it just core'd on me probably because it was one of the first entries
 of the netgroup which failed. If someone who understands the linked
 list in mountd could fix this it would be VERY useful.
 
 Dave
 
 P.S. SunOS just takes these netgroup problems in its stride. Another
 view of the same problem is that you shouldn't do the IP lookup
 at startup time, but instead when a mount request occurs - what happens
 if the IP address of a machine changes between mountd starting and
 the machine trying to mount you? I believe SunOS would cope with this
 and FreeBSD wouldn't. This would be a major change, I believe turing the
 error above into a warning would be fairly easy.
 -- 
 ----------- (Phone: 0161-275-3547) ------------------------ Man can not
 live  -
  David Alan Gilbert - gilbertd@cs.man.ac.uk - G7FHJ@GB7BEV  by bread
 alone. He 
 ----------- (University of Manchester - AMULET Group) ----- needs
 chocolate.  -
State-Changed-From-To: open->closed 
State-Changed-By: jlemon 
State-Changed-When: Fri Sep 12 09:37:44 PDT 1997 
State-Changed-Why:  

Fixed in mountd.c, rev 1.24 
>Unformatted:
