From owner-freebsd-rc@FreeBSD.ORG Sun Sep 26 21:06:48 2010 Return-Path: Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DB071065674; Sun, 26 Sep 2010 21:06:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D82078FC20; Sun, 26 Sep 2010 21:06:47 +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 o8QL6lew008196; Sun, 26 Sep 2010 21:06:47 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8QL6llV008192; Sun, 26 Sep 2010 21:06:47 GMT (envelope-from linimon) Date: Sun, 26 Sep 2010 21:06:47 GMT Message-Id: <201009262106.o8QL6llV008192@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: conf/150752: [rc.subr] [patch] be not needed to eval $_pidcmd on reboot stage X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 21:06:48 -0000 Old Synopsis: be not needed to eval $_pidcmd on reboot stage New Synopsis: [rc.subr] [patch] be not needed to eval $_pidcmd on reboot stage Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Sun Sep 26 21:06:17 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=150752 From owner-freebsd-rc@FreeBSD.ORG Mon Sep 27 11:07:02 2010 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224781065675 for ; Mon, 27 Sep 2010 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06D288FC08 for ; Mon, 27 Sep 2010 11:07:02 +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 o8RB71Xq023574 for ; Mon, 27 Sep 2010 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8RB71FN023571 for freebsd-rc@FreeBSD.org; Mon, 27 Sep 2010 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Sep 2010 11:07:01 GMT Message-Id: <201009271107.o8RB71FN023571@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 11:07:02 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/150752 rc [rc.subr] [patch] be not needed to eval $_pidcmd on re o conf/150474 rc [patch] rc.d/accounting: Add ability to set location o o conf/149867 rc [PATCH] rc.d script to manage multiple FIBS (kern opti o conf/149831 rc [PATCH] add support to /etc/rc.d/jail for delegating Z o conf/148961 rc [PATCH] netstart and network_ipv6 contains references o conf/148656 rc rc.firewall(8): {oip} and {iip} variables in rc.firewa o conf/147685 rc [rc.d] [patch] new feature for /etc/rc.d/fsck o conf/147444 rc [rc.d] [patch] /etc/rc.d/zfs stop not called on reboot o conf/146053 rc [patch] [request] shutdown of jails breaks inter-jail o conf/145445 rc [rc.d] error in /etc/rc.d/jail (bad logic) o conf/145440 rc [rc.d] [patch] add multiple fib support (setfib) in /e o conf/145399 rc [patch] rc.d scripts are unable to start/stop programs o conf/145344 rc [patch] Fix kitchen sink approach for rc.d scripts ins o conf/145009 rc [patch] rc.subr(8): rc.conf should allow mac label con o conf/144213 rc [rc.d] [patch] Disappearing zvols on reboot o conf/143637 rc [patch] ntpdate(8) support for ntp-servers supplied by o conf/143085 rc [patch] ftp-proxy(8) rc(8) with multiple instances o conf/143084 rc [jail] [patch]: fix rc.d/jail creating stray softlinks o conf/142973 rc [jail] [patch] Strange counter init value in jail rc o conf/142434 rc [patch] Add cpuset(1) support to rc.subr(8) o conf/142304 rc rc.conf(5): mdconfig and mdconfig2 rc.d scripts lack e o conf/141909 rc rc.subr(8): [patch] add rc.conf.d support to /usr/loca o conf/141907 rc [rc.d] Bug if mtu (maybe others?) is set as first argu o conf/141678 rc [patch] A minor enhancement to how /etc/rc.d/jail dete o conf/141275 rc [request] dhclient(8) rc script should print something o conf/140440 rc [patch] allow local command files in rc.{suspend,resum o conf/140261 rc [patch] Improve flexibility of mdconfig2 startup scrip o conf/138208 rc [rc.d] [patch] Making rc.firewall (workstation) IPv6 a o conf/137629 rc [rc.d] background_dhclient rc.conf option causing doub o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/137271 rc [rc.d] Cannot update /etc/host.conf when root filesyst o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/135338 rc [rc.d] pf startup order seems broken [regression] o conf/134918 rc [patch] rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped p bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122968 rc [rc.d] /etc/rc.d/addswap: md swapfile multiplication a o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 88 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Sep 27 16:22:52 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FB111065679 for ; Mon, 27 Sep 2010 16:22:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3CD9E8FC37 for ; Mon, 27 Sep 2010 16:22:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8RGGwR3076198 for ; Mon, 27 Sep 2010 10:16:58 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Sep 2010 10:17:09 -0600 (MDT) Message-Id: <20100927.101709.343708041324879547.imp@bsdimp.com> To: rc@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Time to make /usr/lib/aout optional X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 16:22:52 -0000 I think its time to make /usr/lib/aout optional. The only thing that depends on it is /etc/rc.d/ldconfig. I think the following patch will make it optional. Comments? Index: ldconfig =================================================================== --- ldconfig (revision 213200) +++ ldconfig (working copy) @@ -66,8 +66,8 @@ i386) # Default the a.out ldconfig path. : ${ldconfig_paths_aout=${ldconfig_paths}} - _LDC=/usr/lib/aout - for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do + _LDC="" + for i in /usr/lib/aout ${ldconfig_paths_aout} /etc/ld.so.conf; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" fi From owner-freebsd-rc@FreeBSD.ORG Tue Sep 28 02:20:44 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFB95106564A; Tue, 28 Sep 2010 02:20:44 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB548FC0C; Tue, 28 Sep 2010 02:20:42 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com (192.168.222.22) by WTL-EXCH-1.sandvine.com (192.168.196.31) with Microsoft SMTP Server id 14.0.694.0; Mon, 27 Sep 2010 22:20:42 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id 1844B33C00; Mon, 27 Sep 2010 22:20:42 -0400 (EDT) Date: Mon, 27 Sep 2010 22:20:42 -0400 From: Ed Maste To: Brooks Davis Message-ID: <20100928022042.GA92385@sandvine.com> References: <20100925000435.GA62501@sandvine.com> <20100925183105.GI72897@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20100925183105.GI72897@lor.one-eyed-alien.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-rc@freebsd.org Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 02:20:45 -0000 On Sat, Sep 25, 2010 at 01:31:05PM -0500, Brooks Davis wrote: > On Fri, Sep 24, 2010 at 08:04:35PM -0400, Ed Maste wrote: > > > The attached patch introduces a defaultroute_carrier_delay variable > > and a change to /etc/rc.d/defaultroute to wait that long before bailing > > out if there are no interfaces with carrier. With the default settings > > defaultroute will wait for five seconds to see if any interface gets > > carrier. The original 30 second wait for a default route to appear is > > unchanged. > > > > Any comments? I'll commit it sometime next week if there's no concern. > > This seems like a reasionable solution. Just checking for carrier > didn't work as well as I'd hoped. Have you tested this on a bridge or > similar interface? No, I've tested only on physical interfaces. The logic for detecting carrier is unchanged from what was there though, so I wouldn't expect any significant change. > It seems like in some senses there's probably something more the nic > could be telling us about it's state so we could do a better job here. > What we really want to know is if we have any dhcp interfaces that have > a chance of getting a lease any time soon so if the interface could say "I think I've got a > cable attached" that would be useful. I agree, but that's not a project I'm ready to take on at the moment :) I wonder how (if) other operating systems handle this. -Ed From owner-freebsd-rc@FreeBSD.ORG Tue Sep 28 03:23:51 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9F4106564A for ; Tue, 28 Sep 2010 03:23:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id EA92E8FC15 for ; Tue, 28 Sep 2010 03:23:50 +0000 (UTC) Received: (qmail 13055 invoked by uid 399); 28 Sep 2010 03:23:49 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 28 Sep 2010 03:23:49 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4CA15FC8.8010106@FreeBSD.org> Date: Mon, 27 Sep 2010 20:23:52 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: freebsd-rc@freebsd.org References: <20100925000435.GA62501@sandvine.com> In-Reply-To: <20100925000435.GA62501@sandvine.com> X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jeremy Chadwick Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 03:23:51 -0000 On 9/24/2010 5:04 PM, Ed Maste wrote: > /etc/rc.d/defaultroute currently bails immediately if all interfaces > set to use DHCP have no carrier. This caused grief at work as it takes > some time for link to be established, and defaultroute ran before this > happened. The rest of rc.d/ ran then before DHCP could assign an > address and route. > > The attached patch introduces a defaultroute_carrier_delay variable > and a change to /etc/rc.d/defaultroute to wait that long before bailing > out if there are no interfaces with carrier. With the default settings > defaultroute will wait for five seconds to see if any interface gets > carrier. The original 30 second wait for a default route to appear is > unchanged. > > Any comments? I'll commit it sometime next week if there's no concern. There was a more generic solution floating around fairly recently, from Jeremy Chadwick. The thread on this list starts back in april, but the latest version of the script appeared in june, so you might want to start there. I used versions of that script for most of this calendar year, and offered to commit it if the rc.conf.5 update was written. Jeremy, if you've done that bit and I lost track, apologies, my FreeBSD time has been super limited lately, but it's on the upswing at the moment, so maybe you could update us? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Wed Sep 29 07:59:46 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19BEE10656A4 for ; Wed, 29 Sep 2010 07:59:46 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta05.westchester.pa.mail.comcast.net (qmta05.westchester.pa.mail.comcast.net [76.96.62.48]) by mx1.freebsd.org (Postfix) with ESMTP id BB6658FC19 for ; Wed, 29 Sep 2010 07:59:45 +0000 (UTC) Received: from omta20.westchester.pa.mail.comcast.net ([76.96.62.71]) by qmta05.westchester.pa.mail.comcast.net with comcast id CXiw1f0061YDfWL55XmXTt; Wed, 29 Sep 2010 07:46:31 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta20.westchester.pa.mail.comcast.net with comcast id CXmW1f0053LrwQ23gXmWCu; Wed, 29 Sep 2010 07:46:31 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id EC68A9B418; Wed, 29 Sep 2010 00:46:28 -0700 (PDT) Date: Wed, 29 Sep 2010 00:46:28 -0700 From: Jeremy Chadwick To: Doug Barton Message-ID: <20100929074628.GA83194@icarus.home.lan> References: <20100925000435.GA62501@sandvine.com> <4CA15FC8.8010106@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CA15FC8.8010106@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-rc@freebsd.org Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 07:59:46 -0000 On Mon, Sep 27, 2010 at 08:23:52PM -0700, Doug Barton wrote: > On 9/24/2010 5:04 PM, Ed Maste wrote: > >/etc/rc.d/defaultroute currently bails immediately if all interfaces > >set to use DHCP have no carrier. This caused grief at work as it takes > >some time for link to be established, and defaultroute ran before this > >happened. The rest of rc.d/ ran then before DHCP could assign an > >address and route. > > > >The attached patch introduces a defaultroute_carrier_delay variable > >and a change to /etc/rc.d/defaultroute to wait that long before bailing > >out if there are no interfaces with carrier. With the default settings > >defaultroute will wait for five seconds to see if any interface gets > >carrier. The original 30 second wait for a default route to appear is > >unchanged. > > > >Any comments? I'll commit it sometime next week if there's no concern. > > There was a more generic solution floating around fairly recently, > from Jeremy Chadwick. The thread on this list starts back in april, > but the latest version of the script appeared in june, so you might > want to start there. I used versions of that script for most of this > calendar year, and offered to commit it if the rc.conf.5 update was > written. > > Jeremy, if you've done that bit and I lost track, apologies, my > FreeBSD time has been super limited lately, but it's on the upswing > at the moment, so maybe you could update us? Ack, I forgot all about this (and despite recommending the script to someone on the lists a couple weeks ago)! The script Doug's referring to is available below, and should be placed into /usr/local/etc/rc.d (be sure to chmod 755/555 it as well): http://jdc.parodius.com/freebsd/netwait Example usage in /etc/rc.conf: netwait_enable="yes" netwait_ip="4.2.2.1 4.2.2.2" netwait_if="em0" netwait_timeout="15" This version lacks some of Doug's recommended changes (some minor syntax changes and a more realtime indicator of what's going on by printing dots/periods) -- I'll dig up Doug's Email from a while back and make some time to implement his recommendations. The idea in the long-run is to get this script committed to the base system (e.g. /etc/rc.d), have rc.conf(5) updated to mention the variables, in addition to src/etc/defaults/rc.conf. Furthermore, I should probably file a PR for all of this... -- | 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 | From owner-freebsd-rc@FreeBSD.ORG Wed Sep 29 10:01:02 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AE1F1065673 for ; Wed, 29 Sep 2010 10:01:02 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id 47A308FC16 for ; Wed, 29 Sep 2010 10:01:01 +0000 (UTC) Received: from omta20.westchester.pa.mail.comcast.net ([76.96.62.71]) by qmta10.westchester.pa.mail.comcast.net with comcast id CZSB1f0041YDfWL5Aa12UG; Wed, 29 Sep 2010 10:01:02 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta20.westchester.pa.mail.comcast.net with comcast id Ca111f0093LrwQ23ga128B; Wed, 29 Sep 2010 10:01:02 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 4E7E09B418; Wed, 29 Sep 2010 03:01:00 -0700 (PDT) Date: Wed, 29 Sep 2010 03:01:00 -0700 From: Jeremy Chadwick To: Doug Barton Message-ID: <20100929100100.GA83642@icarus.home.lan> References: <20100925000435.GA62501@sandvine.com> <4CA15FC8.8010106@FreeBSD.org> <20100929074628.GA83194@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100929074628.GA83194@icarus.home.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-rc@freebsd.org Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 10:01:02 -0000 On Wed, Sep 29, 2010 at 12:46:28AM -0700, Jeremy Chadwick wrote: > On Mon, Sep 27, 2010 at 08:23:52PM -0700, Doug Barton wrote: > > On 9/24/2010 5:04 PM, Ed Maste wrote: > > >/etc/rc.d/defaultroute currently bails immediately if all interfaces > > >set to use DHCP have no carrier. This caused grief at work as it takes > > >some time for link to be established, and defaultroute ran before this > > >happened. The rest of rc.d/ ran then before DHCP could assign an > > >address and route. > > > > > >The attached patch introduces a defaultroute_carrier_delay variable > > >and a change to /etc/rc.d/defaultroute to wait that long before bailing > > >out if there are no interfaces with carrier. With the default settings > > >defaultroute will wait for five seconds to see if any interface gets > > >carrier. The original 30 second wait for a default route to appear is > > >unchanged. > > > > > >Any comments? I'll commit it sometime next week if there's no concern. > > > > There was a more generic solution floating around fairly recently, > > from Jeremy Chadwick. The thread on this list starts back in april, > > but the latest version of the script appeared in june, so you might > > want to start there. I used versions of that script for most of this > > calendar year, and offered to commit it if the rc.conf.5 update was > > written. > > > > Jeremy, if you've done that bit and I lost track, apologies, my > > FreeBSD time has been super limited lately, but it's on the upswing > > at the moment, so maybe you could update us? > > Ack, I forgot all about this (and despite recommending the script to > someone on the lists a couple weeks ago)! The script Doug's referring > to is available below, and should be placed into /usr/local/etc/rc.d (be > sure to chmod 755/555 it as well): > > http://jdc.parodius.com/freebsd/netwait > > Example usage in /etc/rc.conf: > > netwait_enable="yes" > netwait_ip="4.2.2.1 4.2.2.2" > netwait_if="em0" > netwait_timeout="15" > > This version lacks some of Doug's recommended changes (some minor syntax > changes and a more realtime indicator of what's going on by printing > dots/periods) -- I'll dig up Doug's Email from a while back and make > some time to implement his recommendations. I misread Doug's proposed changes -- it's not to print dots/periods to indicate status, I misread the patch. :-) I've implemented his changes and the above script has been updated to include them. We should be good to go, aside from removal of a couple commented out default variables near the top of the script. > The idea in the long-run is to get this script committed to the base > system (e.g. /etc/rc.d), have rc.conf(5) updated to mention the > variables, in addition to src/etc/defaults/rc.conf. > > Furthermore, I should probably file a PR for all of this... I just spent the past couple hours doing the rc.conf.5 and defaults/rc.conf modifications. These, as well as the netwait script itself, should be reviewed by those more familiar with the base system rc(8) stuff (hi Doug. :-) ). Meaning: I'm not sure where the default values should be set. The official PR, which contains URLs to the patches and the script itself. Not showing up on the web yet, but I got the GNATS response. http://www.freebsd.org/cgi/query-pr.cgi?pr=151063 -- | 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 | From owner-freebsd-rc@FreeBSD.ORG Wed Sep 29 16:31:38 2010 Return-Path: Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A319F1065670; Wed, 29 Sep 2010 16:31:38 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 793D58FC1A; Wed, 29 Sep 2010 16:31:38 +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 o8TGVctR027315; Wed, 29 Sep 2010 16:31:38 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8TGVcCk027306; Wed, 29 Sep 2010 16:31:38 GMT (envelope-from linimon) Date: Wed, 29 Sep 2010 16:31:38 GMT Message-Id: <201009291631.o8TGVcCk027306@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: conf/151063: [rc.subr] Verify network link and packet flow before starting network services X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 16:31:38 -0000 Synopsis: [rc.subr] Verify network link and packet flow before starting network services Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: linimon Responsible-Changed-When: Wed Sep 29 16:31:31 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=151063 From owner-freebsd-rc@FreeBSD.ORG Thu Sep 30 13:57:53 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D13331065672; Thu, 30 Sep 2010 13:57:53 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 90A3C8FC14; Thu, 30 Sep 2010 13:57:53 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com (192.168.222.22) by WTL-EXCH-1.sandvine.com (192.168.196.31) with Microsoft SMTP Server id 14.0.694.0; Thu, 30 Sep 2010 09:57:42 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id AE5FF33C00; Thu, 30 Sep 2010 09:57:52 -0400 (EDT) Date: Thu, 30 Sep 2010 09:57:52 -0400 From: Ed Maste To: Jeremy Chadwick Message-ID: <20100930135752.GA81590@sandvine.com> References: <20100925000435.GA62501@sandvine.com> <4CA15FC8.8010106@FreeBSD.org> <20100929074628.GA83194@icarus.home.lan> <20100929100100.GA83642@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20100929100100.GA83642@icarus.home.lan> User-Agent: Mutt/1.4.2.1i Cc: Doug Barton , freebsd-rc@freebsd.org Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2010 13:57:53 -0000 On Wed, Sep 29, 2010 at 03:01:00AM -0700, Jeremy Chadwick wrote: > > Ack, I forgot all about this (and despite recommending the script to > > someone on the lists a couple weeks ago)! The script Doug's referring > > to is available below, and should be placed into /usr/local/etc/rc.d (be > > sure to chmod 755/555 it as well): > > > > http://jdc.parodius.com/freebsd/netwait > > > > Example usage in /etc/rc.conf: > > > > netwait_enable="yes" > > netwait_ip="4.2.2.1 4.2.2.2" > > netwait_if="em0" > > netwait_timeout="15" I think the approach in this script is overall reasonable, but one thing I prefer about the current /etc/rc.d/defaultroute is that it doesn't need to be configured with a specific IP address, so it can "just work" out of the box. Jeremy, was your primary motivation for netwait DHCP, or are there other bootup issues you had to address with it as well? What do you think about combining the two, so that we'd have the current functionality if DHCP is in use and netwait_ip is not set, and the ping check if netwait_ip is set (regardless of the DHCP setting)? I think "netwait" is a more descriptive name than "defaultroute." -Ed From owner-freebsd-rc@FreeBSD.ORG Thu Sep 30 14:32:22 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46D16106566C for ; Thu, 30 Sep 2010 14:32:22 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mx1.freebsd.org (Postfix) with ESMTP id 2D03B8FC17 for ; Thu, 30 Sep 2010 14:32:22 +0000 (UTC) Received: from omta16.emeryville.ca.mail.comcast.net ([76.96.30.72]) by qmta14.emeryville.ca.mail.comcast.net with comcast id D0m81f0021ZMdJ4AE2KCmm; Thu, 30 Sep 2010 14:19:12 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta16.emeryville.ca.mail.comcast.net with comcast id D2KB1f00H3LrwQ28c2KBV6; Thu, 30 Sep 2010 14:19:12 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 6B0849B418; Thu, 30 Sep 2010 07:19:11 -0700 (PDT) Date: Thu, 30 Sep 2010 07:19:11 -0700 From: Jeremy Chadwick To: Ed Maste Message-ID: <20100930141911.GA19108@icarus.home.lan> References: <20100925000435.GA62501@sandvine.com> <4CA15FC8.8010106@FreeBSD.org> <20100929074628.GA83194@icarus.home.lan> <20100929100100.GA83642@icarus.home.lan> <20100930135752.GA81590@sandvine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100930135752.GA81590@sandvine.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Doug Barton , freebsd-rc@freebsd.org Subject: Re: Wait for carrier in /etc/rc.d/defaultroute X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2010 14:32:22 -0000 On Thu, Sep 30, 2010 at 09:57:52AM -0400, Ed Maste wrote: > On Wed, Sep 29, 2010 at 03:01:00AM -0700, Jeremy Chadwick wrote: > > > > Ack, I forgot all about this (and despite recommending the script to > > > someone on the lists a couple weeks ago)! The script Doug's referring > > > to is available below, and should be placed into /usr/local/etc/rc.d (be > > > sure to chmod 755/555 it as well): > > > > > > http://jdc.parodius.com/freebsd/netwait > > > > > > Example usage in /etc/rc.conf: > > > > > > netwait_enable="yes" > > > netwait_ip="4.2.2.1 4.2.2.2" > > > netwait_if="em0" > > > netwait_timeout="15" > > I think the approach in this script is overall reasonable, but one thing > I prefer about the current /etc/rc.d/defaultroute is that it doesn't > need to be configured with a specific IP address, so it can "just work" > out of the box. > > Jeremy, was your primary motivation for netwait DHCP, or are there other > bootup issues you had to address with it as well? The primary motivation was 1) witnessing DNS lookup failures reported by both named (unable to reach root servers) and ntpd (unable to resolve NTP server FQDNs) by our machines in our co-lo, and 2) *many* people in the community needing this. Our co-lo machines *do not* use DHCP, and there are some community users who do not use DHCP but have *many* network cards in use, combined with vlan(4), and some wild network configurations which have to be taken into consideration. Users, understandably, think link state represents a usable network but that simply isn't the case. I don't want to get into a discussion about what happens when things like LLDP or STP are in use on switches either (link is up but the network isn't, and for up to something like 30 seconds; yeah yeah yeah, RSTP exists and all that, I know). :-) I feel that's why netwait or equivalent is important. > What do you think about combining the two, so that we'd have the current > functionality if DHCP is in use and netwait_ip is not set, and the ping > check if netwait_ip is set (regardless of the DHCP setting)? I think this is something the rest of the community can discuss and work out, or maybe freebsd-rc@ specifically. Honestly, it doesn't matter to me, but I'd much rather someone else drive that piece of the effort. If someone wants to commit something that incorporates all or part of my work, whether it be a separate rc script or merge it into defaultroute, that's great, I'm 100% cool with that. Just be aware you can't just copy-paste or "drop in" the netwait code into defaultroute and have it work; the rc order matters greatly (BEFORE/REQUIRE lines). Run "rcorder /etc/rc.d/* /usr/local/etc/rc.d/*" sometime to see what I mean. Also, yesterday I opened a PR on getting the script committed to the base system. It might be a good place to take the discussion so there's a log and so on -- or, if folks wanna continue discussing it here, that's fine too. Here's the PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=151063 -- | 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 |