diff options
| -rw-r--r-- | docs/design.md | 19 |
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 |
