From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17314 invoked from network); 21 Oct 2020 13:17:51 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 21 Oct 2020 13:17:51 -0000 Received: (qmail 28959 invoked by uid 89); 21 Oct 2020 13:18:14 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 28952 invoked from network); 21 Oct 2020 13:18:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=0z+fZdNajTN6fcA4mnonTRFHpAtD1xKcsON/yfFaCD4=; b=q6WU4aM9FuJipwsMBgE6b8m01nrbaagwG6TZsF948ElnvY5QZpxg9vK6CurHP49ocZ DH4aYZW6hk14spYojRiyAY1cT4R6BFWbUAsMpzQ2R6Lw4x/F0MF2KaM4swRFcHcDfxUP rfuSAE6NIlvfhgBR/IyTdFv7uBS2eUnTkLts1jbmrLJ1ghSJwo+nKN3E2rKCKhoWSuI7 61NnkA//k9KengQDZfNfFslrcm9LhWR4EC2S4CfwhpJLBUZX0pBH4l7JVqEZyTYJc4P7 mA6zWZLmDeZb3mImgzm1zvYJPwy1Hvdmti/ItzI7gu3FgkwOeCGpMZTp+cpY9KkGd3r/ TmHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=0z+fZdNajTN6fcA4mnonTRFHpAtD1xKcsON/yfFaCD4=; b=UhvaB7ihN2gun3j7QQbJBuNLsGTWG8BkP+NDlVKs8wiAfhZPFeZAOr9wVXnfnKS2JX f5im4KBBG5qSPOuDeEo6FxppDsZkw67cm8tHV4UBPOTT8qDpFQdB3MVngdwspgflNCA/ 0Rx3aEbU59v8UsSLI/R1ELbAa6JHNClbbb6/z/cXkNB9VBKqAkqRLn2cnbSAdHJLaRqo Zt2nBDLumAfpgVlZl037VQZRDIXJDwour3uIbomJd6ov5qD39iHFMT8TbUa8dfVurq9M M/Md8+NeGEiWIvXNXM+E80f2XRSeMyvuXYlLqKgxWFlYp0Wg1ZmclWpnElwGpXnCROk/ +jzg== X-Gm-Message-State: AOAM532uEbi7puv/BsYGHVyQHzrfEWfGCA6ByRFrKLsfUG7WeGS/CGjO PQRjVJqAkvxOjh2v4glekXWBB542Au2BRS2kVNIZU33G2vI= X-Google-Smtp-Source: ABdhPJzsbkWwxM8WdETGC6tGkwSv6Jdw/+i1C+P7agS9ixz2OlsWMrIAtbha3gjYZFz2VAU0Ss5BJo1Q7+eOP7UuYKk= X-Received: by 2002:a92:1b8d:: with SMTP id f13mr2523273ill.38.1603286266871; Wed, 21 Oct 2020 06:17:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Guillermo Date: Wed, 21 Oct 2020 10:17:38 -0300 Message-ID: Subject: Re: Dependencies in S6 To: Supervision Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mi=C3=A9., 21 oct. 2020 a las 7:10, Amaresh Kotekal escribi=C3=B3: > > Secnario 1: > 1. A & B are one shot services in a s6-rc bundle. Service B is dependent = on > A. ( added in dependency file). > 2. I think Service B will start after the completion of service A ( A the= n > B, in serial manner ) is it correct ? or > 3. Service B will start immediately after the service A as started (in a > parallel manner) ? #2. If A starts successfully, B will be started after A, i.e. serially. If A fails to start, B won't be started.at all. > Secnario 2: > 1. A is one shot service and B is a long run service. Service B is > dependent on Service A. Same as scenario #1. Whether B is a longrun or a oneshot does not change the behaviour. > Secnario 3: > 1. A is a long run service and B is a one shot service. Service B is > dependent on Service A. > [...] > 3. Do I need to use notification mechanism if I want to start service B > after A service as reached particular point in execution Same as scenario #1, service type does not affect the behaviour. What does depend on service type is the way s6-rc detects that state transition has completed, and the way it detects transition failure. For oneshots, transition completion happens when the oneshot's process terminates. And transition failure is determined based on the process' exit code, and, if a timeout was specified with a 'timeout-up' file, also on whether it terminates before the timeout. For longruns that support readiness notification, transition completion happens when the longrun's process notifies readiness. And if a timeout was specified with a 'timeout-up' file, transition failure is determined based on whether notification happens before the timeout. If there is no support for readiness notification, transition completion happens when the longrun's process has been spawned by its corresponding s6-supervise process, because there is no better way. If the process can be polled for readiness, you can use the s6-notifyoncheck program to hook to s6-supervise's readiness notification mechanism. * http://www.skarnet.org/software/s6/s6-notifyoncheck.html > Secnario 4: > 1. A & B both are long run services. Service B is dependent on Service A. Left as an excercise :) G.