From ce49b0504c523820be6ba33ac370da19bf75d9eb Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Sun, 18 Jun 2017 15:35:40 +0000
Subject: Usability changes for transition failures in s6-rc change
- Add explicit s6-svc -d call for longrun transition failure
- Add SIGTERM and SIGINT handling: kill all longrun transitions
- Doc update
- Credit Lionel
- Prepare for 0.2.1.0
---
doc/index.html | 6 +++---
doc/s6-rc.html | 40 ++++++++++++++++++++++++++++++++++++++++
doc/upgrade.html | 15 +++++++++++++++
3 files changed, 58 insertions(+), 3 deletions(-)
(limited to 'doc')
diff --git a/doc/index.html b/doc/index.html
index 39d0208..aec93ff 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -48,11 +48,11 @@ scripts are also run in a controlled environment.
A POSIX-compliant system with a standard C development environment
GNU make, version 3.81 or later
skalibs version
-2.5.1.0 or later
+2.5.1.1 or later
execline version
2.3.0.1 or later
s6 version
-2.5.1.0 or later
+2.6.0.0 or later
Licensing
@@ -66,7 +66,7 @@ scripts are also run in a controlled environment.
- The current released version of s6-rc is
-0.2.0.1.
+0.2.1.0.
- Alternatively, you can checkout a copy of the
s6-rc
git repository:
diff --git a/doc/s6-rc.html b/doc/s6-rc.html
index 957c108..7052b45 100644
--- a/doc/s6-rc.html
+++ b/doc/s6-rc.html
@@ -252,6 +252,31 @@ s6-rc will wait forever on an "up" transition for the notification
to arrive. The transition will fail if a timeout occurs.
+
+ If a down transition fails, s6-rc does nothing with it. The service
+has already received a SIGTERM, and may be stuck in the process of exiting;
+or it may already have died but is stuck in a bad finish script
+that is not timing out. In any case, it is not a situation that s6-rc
+can recover from; the service is most likely down, but the administrator
+should manually check their process list. And fix their scripts, or
+timeout values, because a down transition failure is always a
+programmer or sysadmin error.
+
+
+
+ If an up transition fails, s6-rc sends an explicit
+s6-svc -d command to
+the longrun. This ensures the service is in a known down state
+when failing to go up, instead of (for instance) being stuck in a not-ready
+limbo state.
+
+
+
+ Note that proper usage of the timeout-kill and timeout-finish
+values in the longrun's definition directory can considerably reduce the
+number of cases where the service is left in an unknown state.
+
+
Transitions are supposed to be idempotent, but it is a general
rule of supervision that run and finish scripts
@@ -310,6 +335,21 @@ each simulated transition will take dryrunthrottle
milliseconds to complete successfully.
+ Signals
+
+
+ s6-rc change reacts to the following signals:
+
+
+
+ - SIGTERM: s6-rc immediately aborts all its longrun transitions with
+a failure, and the impacted longruns will most likely be in a down
+state. Oneshot transitions are untouched, because killing the
+oneshot subprocess would make it impossible to determine what state the
+oneshot service is in.
+ - SIGINT: same as SIGTERM.
+
+
Usage examples
s6-rc change myservicebundle
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 3db2fd0..2e4bd72 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,21 @@
What has changed in s6-rc
+ in 0.2.1.0
+
+
+ - skalibs
+dependency bumped to 2.5.1.1.
+ - execline
+dependency bumped to 2.3.0.1.
+ - s6
+dependency bumped to 2.6.0.0.
+ - s6-rc change now ensures that a
+longrun is down when its up transition fails.
+ - s6-rc change now kills subprocesses
+waiting on a longrun transition when it receives a SIGINT or a SIGTERM.
+
+
in 0.2.0.1