Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 01:49:24 +0300
From:      Atte =?iso-8859-1?Q?Peltom=E4ki?= <atte.peltomaki@iki.fi>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Replacing rc(8) (Was: FreeBSD Boot Times)
Message-ID:  <20120621224924.GM96212@ass.kameli.org>
In-Reply-To: <CAOjFWZ63C5mBQBYRnG4GKRBR1uPiyG06Svz_x44_=VnfwL=u7w@mail.gmail.com>
References:  <alpine.BSF.2.00.1206201618560.75278@wojtek.tensor.gdynia.pl> <CAPDOV49kkOdeV%2B6LVW5j5PO6VYrrNVqWZEksc_GzvWHjbufoAQ@mail.gmail.com> <alpine.BSF.2.00.1206201722520.1856@wojtek.tensor.gdynia.pl> <CAPDOV4_ufNGyheDAhPxfndJ7WtH_u=5z7mrLtW-5-a9BMbCswg@mail.gmail.com> <alpine.BSF.2.00.1206201745040.1949@wojtek.tensor.gdynia.pl> <CAPDOV4_Fsj_QCLDWSs3o5qiDKS2hTH4qBf8fwJftne8KJNXy1Q@mail.gmail.com> <op.wf7v5el5g7njmm@michael-think> <CAPDOV4_x2T7p_3puD6AKpjoTwFCRPeP6mvvLxRVv_ZrgCTmU3g@mail.gmail.com> <CAPDOV4-2Hz=9fXBJ=oeRFxF7MEeQex946NdpgiPdSJzBwMrcBQ@mail.gmail.com> <CAOjFWZ63C5mBQBYRnG4GKRBR1uPiyG06Svz_x44_=VnfwL=u7w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 20, 2012 at 02:42:49PM -0700, Freddie Cash wrote:
> There's no need to do a wholesale replacement of the RC system in
> FreeBSD to support this concept.  What you are describing are "service
> profiles".  And we already have a single file that describes the
> default "service profile" for FreeBSD:  /etc/rc.conf.  That lists
> every service that should be started (or stopped).
> 
> All that's missing is a way to tell the RC system to use a different
> rc.conf file (like rc.conf.mobile, or rc.conf.wireless or
> rc.conf.whatever), and to run through the RC setup based on that file.
> 
> Our current RC system does everything needed except:
>   - parallel execution of items that don't depend on each other
>   - monitor running services and restart them if they crash

- Service dependencies: if a service fails that is required by another
  service, the other is stopped as well.

- Monitoring services and ability to configure the service supervisor
  behaviour: if service fails and is restarted X times in period Y, 
  execute action Z.

- Extending the concept of service beyond userland. Kernel services are
  services too, if eg. network is down, you probably don't want to even
  try to start a dozen jails.

- Permission control (like possible in jails now, "limited root"), 
  non-root users can be delegated permissions to start/stop selected 
  services and configure their behaviour.

It's clearly arguable as to which of these features and to what extent
is reasonable to implement and whether or not it can or should be done
in the existing rc system, instead of implementing a new one that just
supports the old rc system as it is.

There are real benefits in some of these features, but they can easily
turn out as esoteric features in a bloated piece of code, if not
implemented with great care. I don't know the internals of current rc
system well enough to form educated opinion on how any of this could be
done in practice, but I have plentyful experience in how and why projects 
fail and in this particular case I see a lot of chances for fail with
relatively little gain.

Just something to think about.. Might be worth noting that I work with
Linux systems most of the time and over-engineering is a chronic problem
there. I've always admired the simple but effective BSD approach, rather
do less but well than a lot badly.

-- 
Atte Peltomäki
     atte.peltomaki@iki.fi <> http://kameli.org
"Your effort to remain what you are is what limits you"



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