Thank you for your clarifications.

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

Right. Understood.

> >- 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.

Could you elaborate a little more about the state transition failures
of oneshots caused by timeouts?

Let's say for example the oneshot's up script times out, so the
transition fails. From s6-rc's point of view the oneshot is still
down. What actually happens to the process running the up script? Is
it left running in the background? If yes, is it correct to assume
that since s6-rc considers it down, another invocation of the s6-rc -u
change command on the same oneshot will spawn another instance of the
up script? If not, is it killed, and how?

I stumbled upon some unexpected behavior while doing some tests
yesterday. I'd like to know if this is by design or unintended.
Consider this scenario:

2 longruns s1 and s2
s2 depends on s1
s2 takes less than 1 sec to start and become ready on its own
s2 has a timeout-up of 5 secs
s1 has a run script containing an artificial delay of 6 secs

Test 1:
s1 is up and ready
s2 is down
s6-rc -u change s2

Success. OK.

Test 2:
s1 is down
s2 is down
s6-rc -u change s2
s6-rc: fatal: timed out
s6-svlisten1: fatal: timed out

Timeout failure. Unexpected. I thought timeout-up and timeout-down
applied to each atomic service individually, not to the entire
dependency chain to bring it up or down.

Reply via email to