Re: Some suggestions about s6 and s6-rc

From: Colin Booth <cathexis_at_gmail.com>
Date: Sun, 20 Sep 2015 01:47:36 -0700

On Sun, Sep 20, 2015 at 12:15 AM, Casper Ti. Vector
<caspervector_at_gmail.com> wrote:
> (Accidentally sent to Colin as private mail, reposting verbatim here;
> sorry for the disturbance...)
>
> Well, this naming issue is all about overloading... To circumvent the
> overloading problem, we can also use some other name pairs like
> `start'/`stop' or `begin'/`end' (Gentoo and LaTeX user here ;). But
> that introduces another problem: more names to remember.
>
> So this is somewhat a dilemma. Different context and developers might
> lead to different decisions; I personally would rather like to support
> overloading the `run'/`finish' name pair, for the similar reason for
> Unix's choice of the `x' permission bit to represent both "executable"
> for files and "enter-able" for directories: they are loosely correlated
> concepts in orthogonal "subspaces".
>
> The same reason explains why I think `up'/`down' are worse names:
> because `run'/`finish' (in longruns) and `up'/`down' (in longruns) seem
> much less correlated than `up'/`down' (in longruns) and `up'/`down' (in
> oneshots currently).
>
Sure, and that makes total sense. My issue is that you aren't making a
"run" or "finish" scripts since those have specific rules about when
they are triggered (./run is started when a service is supposed to be
up but isn't, and ./finish is started when ./run exits).
Descriptively, `up' and `down' are _more_ correct since those are the
scripts that should be fired when the oneshop service is brought to
the given state. Additionally, when running under s6-rc, down files
for longruns are something that you are explicitly not allowed to use
since that file name is reserved for internal use. Because of that
there is no name collision between run/up and finish/down.

Again, it totally makes sense that people might want to consolidate on
a single naming convention, but it makes more sense (in my book) to
have different names for start and finish handling of oneshots and
longruns since the handing is different. The distinction is
specifically thus: ./up is what fires when the service is brought up,
./down is what fires when the service is brought down, ./run is what
fires when a non-running service is supposed to be running, and
./finish is when a running service stops. Just because oneshots don't
support run or finish, or that longruns don't support up or down,
doesn't mean that the separation of duties is any different.

-- 
"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Sun Sep 20 2015 - 08:47:36 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC