supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Xavier Stonestreet <xstonestreet@gmail.com>
To: supervision@list.skarnet.org
Subject: Re: s6-rc: timeout questions
Date: Wed, 18 Nov 2020 18:49:35 +0100
Message-ID: <CAK-rGM+FKVsA_ok5-C4CdCrzjxPK4Or7C2P3ZF-yGmgLSerhAQ@mail.gmail.com> (raw)
In-Reply-To: <emb4766da9-1c6f-41c1-b36c-722e61032fb6@elzian>

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	other threads:[~2020-11-18 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 15:53 Xavier Stonestreet
2020-11-17 21:53 ` Laurent Bercot
2020-11-18 17:49   ` Xavier Stonestreet [this message]
2020-11-18 19:06     ` Laurent Bercot
2020-11-20 10:30       ` Xavier Stonestreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK-rGM+FKVsA_ok5-C4CdCrzjxPK4Or7C2P3ZF-yGmgLSerhAQ@mail.gmail.com \
    --to=xstonestreet@gmail.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/supervision

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 supervision supervision/ http://inbox.vuxu.org/supervision \
		subscribe@list.skarnet.org
	public-inbox-index supervision

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git