aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-30 17:56:39 +0000
committertv <tv@krebsco.de>2026-11-30 19:51:09 +0000
commit94c73688f08dd4a6bb25c75e62cdaf7849f6c0a1 (patch)
tree184f9299045484bfceb8c762d22f6e77913e6c79 /docs/design.md
parent25ff6d1e2dac04905cb345261ad085d5d40590f9 (diff)
docs: submissions for the next generation
A submission for a generation not yet switched to waits in an incoming directory, which the check before the switch plans against the new schema and the switch takes; or it is staged, with the new generation's receptor, and stored without views or reactions. Either way the switch brings the views, and a host's first switch its state.
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md19
1 files changed, 16 insertions, 3 deletions
diff --git a/docs/design.md b/docs/design.md
index da94eb0..d6d3368 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -400,6 +400,9 @@ run commands, but on the provider's side, before there is a submission.)
reboot, together with the schema it was accepted under (section 6 needs
it). Secrets there are root's, as `/var/src/secrets` is today; later
they can be encrypted to the host's key.
+- Submissions may wait in an incoming directory for the next switch
+ (section 6); those the switch refuses are moved aside, so the next
+ switch doesn't trip over them again.
- At boot and on each apply, the receptor materializes the views under
`/run` (memory): secret ones readable by root only and handed to
services as systemd credentials; public ones readable by everyone.
@@ -474,9 +477,19 @@ keeps what it needs of the stored schema alive in the store.
A fresh submission made for the new schema beats a migration, and the
provider knows what to make: the schema is a file in the system it
deploys. The order for a change that needs both: first submit what the
-new generation wants (the old one keeps and ignores it), then switch.
-With that, most switches need no migration, and migrations are for the
-times nobody is there: rollbacks and boots.
+new generation wants, then switch. Such a submission is *staged*: planned
+against the new schema, by the new generation's receptor, and stored, but
+no views are put in place and no reactions run, so the running generation
+goes on as it is (and keeps, unused, what it has no slot for); the switch
+brings the new views. The simplest way to that: the provider puts the
+submission in an *incoming* directory on the host and switches. The check
+before the switch plans waiting submissions against the new schema (a
+refused one refuses the switch), and the switch takes them, in order,
+before it serves the views. Or the provider stages a submission itself,
+with the new generation's receptor, to see its plan first. Either works on
+a host without enstate, too: its first switch brings its state the same
+way. With that, most switches need no migration, and migrations are for
+the times nobody is there: rollbacks and boots.
## 7. Policy