- Am I correct in thinking that if a service has properly configured
timeout-kill and timeout-finish, timeout-down becomes unnecessary and
even undesirable as it can leave services in an undefined state limbo?
I know the documentation pretty much says so, but I'm still a bit
confused by the existence of timeout-down to begin with, if it's
redundant and unhelpful.

 timeout-kill and timeout-finish are a s6 thing: if present, they're
just copied as is to the service directory that will be managed by
the s6 supervision tree.
 timeout-up and timeout-down are specific to s6-rc: they will be
embedded into the compile database. They do not interact with s6 at
all, they're just a rule for the s6-rc state machine: if the
service does not report being up (resp. down) by the timeout, then
s6-rc marks the transition as failed and stops looking at what
happens with the service.

 For longruns, yes, timeout-kill ensures that the service will
eventually be brought down no matter what. But there are cases where
you *do not want* to kill -9 a daemon (and need a timeout-kill of 0).
timeout-down is useful here, even if it's a pretty niche case.

 And then, of course, the point is that it's needed for oneshots,
which do not have the s6 mechanisms.

- Can you confirm that timeout-up and timeout-down are also used with
oneshots? They are defined in the s6-rc-compile documentation, but the
s6-rc documentation doesn't specifically mention them for oneshots
state transitions.

 Yes, I confirm that they're also (and primarily) used with oneshots.
They're defined in the "atomic services" section, which comprises
longruns *and* oneshots.


Reply via email to