Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 09:58:59 +1000
From:      Peter Jeremy <peter@rulingia.com>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        Daniel Robbins <drobbins@funtoo.org>, openrc@gentoo.org, freebsd-hackers@freebsd.org
Subject:   Re: Replacing rc(8) (Was: FreeBSD Boot Times)
Message-ID:  <20120621235859.GA92948@server.rulingia.com>
In-Reply-To: <alpine.BSF.2.00.1206210003520.1403@wojtek.tensor.gdynia.pl>
References:  <4FE0C123.8030301@gentoo.org> <CAGH67wRidMZrzjzTSdwud%2BZ5V--wOTN8CHXOWcOr%2BE5XHYo2rA@mail.gmail.com> <4FE0F773.1080403@gentoo.org> <CAGH67wQdb-c0Kf=60rkaJSH8Hd0OjwCi=rQQMzGq8xfp2q7b=Q@mail.gmail.com> <4FE100F9.2050009@funtoo.org> <20120620073920.GA5300@lonesome.com> <alpine.BSF.2.00.1206201618560.75278@wojtek.tensor.gdynia.pl> <CAPDOV49kkOdeV%2B6LVW5j5PO6VYrrNVqWZEksc_GzvWHjbufoAQ@mail.gmail.com> <20120620214006.GA1651@aspire.rulingia.com> <alpine.BSF.2.00.1206210003520.1403@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <wojtek@wojtek.tensor.gdynia=
=2Epl> 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+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120621235859.GA92948>