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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4
Received: (qmail 5970 invoked from network); 26 Sep 2023 00:42:08 -0000
Received: from alyss.skarnet.org (95.142.172.232)
by inbox.vuxu.org with ESMTPUTF8; 26 Sep 2023 00:42:08 -0000
Received: (qmail 53474 invoked by uid 89); 26 Sep 2023 00:42:33 -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 53465 invoked from network); 26 Sep 2023 00:42:32 -0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=westernsemico.com; s=default; h=Content-Transfer-Encoding:MIME-Version:
References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:
Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:
List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=hKvYyTfxI9QvKIkVaMn00AanYg1/ZprA4VJD4u5zBis=; b=hAHA/VtdqhP1jKTMzqDcEr9AIe
TNfqcALmvDvWvHq/0rT/na+s8/iHOGPt5AJ7ZBj2adGPFzGCPcsoQOBDdWlBpjxrzXewpzMbkxxxk
/XJ1+SzPzl6rH3Y1J5rOvFdr7zMubcNSm9awS5KbJcGGn2Ai83GX006AlkzveGO6ppEpdxG8ndijc
CleDshLEUssJt6/haWMZDMxfiQb6fSruKSdNGXYkeHz2x96lou5xUqOcCYN5+mdZFhnwJpnXxrTcN
QbT3lwXfPTgZDvjNJUq2YQY7M6IRTD6I5hP78uwqLmBS8riUflClPJyso6eJmFCCwB39l8SwVp13j
3tsF096Q==;
From: Adam Joseph
To: supervision@list.skarnet.org
Cc: Adam Joseph
Subject: [PATCH 2/2] doc: define "singleton bundle", document special rules
Date: Mon, 25 Sep 2023 17:41:17 -0700
Message-ID: <20230926004117.23478-2-adam@westernsemico.com>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <20230926004117.23478-1-adam@westernsemico.com>
References: <20230926004117.23478-1-adam@westernsemico.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server220.web-hosting.com
X-AntiAbuse: Original Domain - list.skarnet.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - westernsemico.com
X-Get-Message-Sender-Via: server220.web-hosting.com: authenticated_id: westwhdn/from_h
X-Authenticated-Sender: server220.web-hosting.com: adam@westernsemico.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-From-Rewrite: unmodified, already matched
While reviewing the source code for s6-rc-update I noticed that it
has special handling for singleton bundles; these are not explicitly
defined in the documentation, nor is this behavior described. This
commit does so.
Signed-off-by: Adam Joseph
---
doc/s6-rc-compile.html | 9 +++++++++
doc/s6-rc-update.html | 13 ++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/doc/s6-rc-compile.html b/doc/s6-rc-compile.html
index ef06893..0c7301b 100644
--- a/doc/s6-rc-compile.html
+++ b/doc/s6-rc-compile.html
@@ -141,6 +141,15 @@ contains a child bundle will be compiled as if the parent bundle had
directly included the child bundle's contents.
+
+A singleton bundle is a bundle which contains exactly one
+atomic after flattening. This distinction is important
+to s6-rc-update, which allows renaming of singleton bundles
+(but not other bundles), and which considers a singleton bundle to
+be of the same type (oneshot or longrun) as the atomic it contains
+for purposes of avoiding unnecessary restarts.
+
+
For atomic services
diff --git a/doc/s6-rc-update.html b/doc/s6-rc-update.html
index 0883a22..49aa16a 100644
--- a/doc/s6-rc-update.html
+++ b/doc/s6-rc-update.html
@@ -149,8 +149,10 @@ service to be restarted in the following cases:
- The service has disappeared in the new compiled. In this case, the
old service will simply be stopped.
- The service has changed types: a oneshot becomes a longrun, a longrun
-becomes a oneshot, or an atomic service becomes a bundle. In this case, the
-old service will be stopped, then the new service will be started.
+becomes a oneshot, or an atomic service becomes a non-singleton bundle. In this case, the
+old service will be stopped, then the new service will be started.
+Note that singleton bundles are considered to be the same type
+as the single atomic they contain.
- The service has a dependency to a service that must restart, or to an
old service that must stop, or to a new service that did not previously
exist or that was previously down.
@@ -202,8 +204,8 @@ can be quoted, that # comments are recognized, etc.
- The first word in a line must be the name of an "old" atomic service, i.e.
-an atomic service contained in the current live database. The remaining
+ The first word in a line must be the name of an "old" atomic service or singleton bundle, i.e.
+an atomic service (or bundle containing exactly one atomic service) contained in the current live database. The remaining
words in the line are instructions telling s6-rc-update how to convert
that service.
@@ -216,7 +218,8 @@ line must be the new name of the service in the new database: s6-rc-update
will then rename it. It is possible
to rename an atomic service to another atomic service or a bundle, but no
matter whether a service is renamed or not, changing its type will force a
-restart.
+restart. Note that singleton bundles are considered to be the same type as
+the atomic they contain.
Restarting
--
2.41.0