From a46879eefd9563015cd6ef88465fef9ecc833054 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 27 Sep 2021 13:19:36 +0200 Subject: [PATCH] TODO --- TODO.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f87420e --- /dev/null +++ b/TODO.md @@ -0,0 +1,55 @@ + - signals (SIGTERM) + + - service-started, service-running, and service-complete + - actually more like: stopped, starting, started, running, failed, and stopping. + - ... but with `complete` added, to mirror `failed`. + - service controls: reload?, restart, pause, unpause, force-stop ("blocked") + - difference between "pause" and "block" is that "pause" stops the + actual program instance but doesn't flag the service as + non-started, while "block" pushes it all the way back to + "stopped". + + - deal with logging + - when syslogd is running, /dev/log is a unix datagram socket + + - service for `apk` operations - otherwise they clash + +Service lifecycle (as freely imagined; really, a state machine similar +to this will be induced by assertion-driven +subconversations/facets...): + + digraph G { + compound=true; + + subgraph cluster_runnable { + label="Runnable"; + running [label="running\n(a.k.a. ready)"]; + starting -> started [label="deps satisfied\nstart svc"]; + started -> running [label="marked running\n-"]; + started -> failed [label="start failed\n-"]; + started -> complete [label="svc done\n-"]; + running -> failed [label="svc failed\n-"]; + running -> complete [label="svc done\n-"]; + failed -> started [label="restart\nstart svc"]; + complete -> started [label="restart\nstart svc"]; + running -> started [label="restart\nstart svc"]; + } + stopped; + paused [label="running\n(paused)"]; + blocked [label="stopped\n(blocked)"]; + + stopped -> starting [label="required\nscan deps"]; + running -> stopped [label="unrequired\nstop svc"]; + + running -> paused [lhead=cluster_runnable, label="pause req\nstop svc"]; + paused -> starting [label="unpause req\nscan deps"]; + + running -> blocked [lhead=cluster_runnable, label="block req\nstop svc"]; + blocked -> stopped [label="unblock req\ncheck for requirement"]; + + paused -> blocked [label="block req\n-"]; + } + +Oh, how about having a set-of-states approach: one for the +supervision/dependency-resolution process, and one for the service +itself?