From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 21 23:59:15 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 456A1106564A for ; Thu, 21 Jun 2012 23:59:15 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 69FA18FC0C for ; Thu, 21 Jun 2012 23:59:13 +0000 (UTC) Received: from server.rulingia.com (c220-239-254-65.belrs5.nsw.optusnet.com.au [220.239.254.65]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q5LNxBSf022082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Jun 2012 09:59:12 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q5LNx2Kn009872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Jun 2012 09:59:02 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q5LNwxNU009867; Fri, 22 Jun 2012 09:58:59 +1000 (EST) (envelope-from peter) Date: Fri, 22 Jun 2012 09:58:59 +1000 From: Peter Jeremy To: Wojciech Puchar Message-ID: <20120621235859.GA92948@server.rulingia.com> References: <4FE0C123.8030301@gentoo.org> <4FE0F773.1080403@gentoo.org> <4FE100F9.2050009@funtoo.org> <20120620073920.GA5300@lonesome.com> <20120620214006.GA1651@aspire.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Daniel Robbins , openrc@gentoo.org, freebsd-hackers@freebsd.org Subject: Re: Replacing rc(8) (Was: FreeBSD Boot Times) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 23:59:15 -0000 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jun-21 00:17:11 +0200, Wojciech Puchar wrote: >> - Lack of dependency handling for manual start/stop > >which is not really a problem and often an adventage. In your opinion. IMO, "runlevels" are a mostly a work-around to hide the lack of proper dependency handling. One obvious use for dependencies is where I have an occasional need for a box to be a NFS server. Given proper dependency handling, I can say "service nfsserver onestart" and it will automatically start rpcbind, statd, lockd and mountd. Another case is doing single-user maintenance on a ZFS system. It would be nice to be able to just say "service zfs start" instead of having to remember to start hostname and hostid first. I agree there are cases where you might want to ignore dependencies. This is easily handled with at "ignore dependencies" flag on service. >> - No provision to automatically restart a daemon if it dies. > >but it should not be a part of rc subsystem at all. Both the monitoring tool and rc subsystem have to interwork to ensure that services aren't inappropriately started or stopped. You can treat them as separate if you insist but the interactions make it much easier if they are designed together. >First - deamons should not die without reason. Agreed but sometimes they can for a wide variety of reasons. > If they do, admin should clearly know it Agreed. But this still requires infrastructure that is not currently avaliable in the base system and is irrelevant to the issue of whether the daemon should be restarted automatically. > and feel it's effects, Some of this can be automated. And a fallback of "try starting it a few times and complain loudly if that doesn't work" is easily implemented (init(8) does it now) and generally works. > and after fixing a source problem , restart it manually. This can present difficulties if you can't actually login remotely because it's sshd that has aborted unexpectedly. And it can be irritating when you get woken at 0300 just to restart some random service that glitched. >in case when you are for some reason required (temporarily of course) to >use daemons that often dies, then just make restart wrapper shell script= =20 >and put it in place of actual daemon in rc.d script. It's nothing to do with "often dies". Unless you have bug-free sotfware, you can have "rarely-and-unexpectedly dies" - which is just as annoying if it occurs when you (or a customer) needs it. And, with this approach, you wind up with N protected daemons and a further N (or 2N if you're paranoid) monitoring daemons - each thrown together independently. A single, central process that can detect when a process dies (or fails some pre-defined "working normally" test) and optionally take some pre-defined action would seem preferable. (Hint: init(8) can already do a lot of this). >there is IMHO already too much automata in default FreeBSD:=20 >default /etc/crontab, /etc/newsyslog.conf and /etc/periodic directory. > >All gets deleted by me as soon as i install FreeBSD. You are free to disable or delete as much of FreeBSD as you like but I personally prefer my systems to reduce my workload by automating normal maintenance tasks. --=20 Peter Jeremy --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/jtUMACgkQ/opHv/APuIfW0QCfcHGODd+qdvVFB2jcqcQuUj/P NGoAoKovM+/n8JYThBVmGA3HfuobYqyq =2GKl -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--