From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 29 10:00:12 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10436106566B for ; Wed, 29 Sep 2010 10:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DE0828FC1E for ; Wed, 29 Sep 2010 10:00:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8TA0BBr008441 for ; Wed, 29 Sep 2010 10:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8TA0B6Z008420; Wed, 29 Sep 2010 10:00:11 GMT (envelope-from gnats) Resent-Date: Wed, 29 Sep 2010 10:00:11 GMT Resent-Message-Id: <201009291000.o8TA0B6Z008420@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Chadwick Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 633B11065673 for ; Wed, 29 Sep 2010 09:53:10 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id 119C48FC19 for ; Wed, 29 Sep 2010 09:53:09 +0000 (UTC) Received: from omta19.westchester.pa.mail.comcast.net ([76.96.62.98]) by QMTA11.westchester.pa.mail.comcast.net with comcast id CZnN1f00127AodY5BZtApB; Wed, 29 Sep 2010 09:53:10 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta19.westchester.pa.mail.comcast.net with comcast id CZt91f0013LrwQ23fZt9ld; Wed, 29 Sep 2010 09:53:09 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id AC3E39B418; Wed, 29 Sep 2010 02:53:07 -0700 (PDT) Message-Id: <20100929095307.AC3E39B418@icarus.home.lan> Date: Wed, 29 Sep 2010 02:53:07 -0700 (PDT) From: Jeremy Chadwick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: dougb@FreeBSD.org Subject: conf/151063: [rc.subr] Verify network link and packet flow before starting network services X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Chadwick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 10:00:12 -0000 >Number: 151063 >Category: conf >Synopsis: [rc.subr] Verify network link and packet flow before starting network services >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 29 10:00:11 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 8.1-STABLE amd64 >Organization: >Environment: System: FreeBSD icarus.home.lan 8.1-STABLE FreeBSD 8.1-STABLE #0: Wed Sep 15 14:59:46 PDT 2010 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64 >Description: There's a long-standing issue that plagues both users and system administrators on FreeBSD: network services (named, ntpd, etc.) starting before the actual network layer is up and fully functional. Monitoring link state according to ifconfig is not enough -- actual packet flow verification is needed. I've written a script along with the help of the community and Doug Barton to help alleviate this problem as best possible. There are better solutions over the long-term, involving daemons which maintain/spawn services (think svcs(1) and svcadm(1M) on Solaris), but for now this should be sufficient. Original discussion thread: http://lists.freebsd.org/pipermail/freebsd-stable/2010-April/056400.html The script is in use by existing community users, and tested by a good number of people with complex network environments (dual NICs + vlan(4) + NAT) on both RELENG_7 and RELENG_8. So far it has been used by placing the script into /usr/local/etc/rc.d followed by setting appropriate vars in /etc/rc.conf: http://jdc.parodius.com/freebsd/netwait Patches for rc.conf(5) man page and /etc/defaults/rc.conf: http://jdc.parodius.com/freebsd/netwait_patches/ All of this should be reviewed by someone with familiarity with rc(8). Please CC Doug Barton as well. Thanks! >How-To-Repeat: n/a >Fix: n/a >Release-Note: >Audit-Trail: >Unformatted: