From owner-freebsd-rc@FreeBSD.ORG Tue Mar 25 02:54:17 2008 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 DF9B11065672 for ; Tue, 25 Mar 2008 02:54:17 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 815988FC17 for ; Tue, 25 Mar 2008 02:54:17 +0000 (UTC) (envelope-from sam@errno.com) Received: from Macintosh-2.local ([10.0.0.196]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m2P2s5fA043296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Mar 2008 19:54:05 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <47E8694D.7040400@errno.com> Date: Mon, 24 Mar 2008 19:54:05 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "M. Warner Losh" References: <47E809EE.4080809@errno.com> <47E81D12.5090201@FreeBSD.org> <47E81DD1.8050205@errno.com> <20080324.180344.106014229.imp@bsdimp.com> In-Reply-To: <20080324.180344.106014229.imp@bsdimp.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: freebsd-rc@FreeBSD.org Subject: Re: boot ordering and syslogd 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, 25 Mar 2008 02:54:18 -0000 M. Warner Losh wrote: > In message: <47E81DD1.8050205@errno.com> > Sam Leffler writes: > : Doug Barton wrote: > : > Sam Leffler wrote: > : >> I tried to use syslog to debug an issue with dhclient and noticed > : >> that syslogd is started too late for it to work. This is because > : >> dhclient operates in a chroot jail so must setup it's connection to > : >> syslogd before privsep work is done. This seems like a general > : >> problem and one that should be fixed. > : >> > : >> Anyone got an idea how to correct this? > : > > : > It's a chicken-and-egg issue because if you need the network to do > : > remote syslog'ing (or syslog'ing to an NFS partition, etc.), you need > : > the network up first. > : > > : > What I've done in similar situations is to modify a copy of > : > dhclient-script to spit out data to a text file. If you need something > : > more robust you could always change the ordering locally. If you need > : > help with that just let us know. > : > : Er, this is a problem that needs to be fixed; not hacked around w/ local > : mods. We are losing logging that makes diagnosing problems hard. > > Yes. We need to fix syslogd to be able to start before the network > or even FS are mounted and have the only thing that goes 'bad' be the > data to the missing data sinks (disk, network, etc). A quick fix to > this would be to have syslog get a HUP after each of these events and > start syslogd just as soon as /usr is mounted. Yes, I agree changing syslogd may be best even if we can shuffle the order of rc scripts. It might not be too bad to have syslogd buffer msgs until the sink (e.g. log file) is available (maybe use a ring buffer to limit resource use). It might not be too bad to just stat for the sink on each received msg since this should hopefully be a very short window. If we don't change syslogd then we'd need to change the client code which seems much more complicated. Sam