aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: programs run in a sandboxtv8 hours1-2/+3
|
* enstate: a setting the command doesn't use, as an argument, is an errortv8 hours3-8/+51
| | | | | | | --state-dir and --run-dir with --pack, --systemctl but with --apply and --migrate, --unit but with --apply. From a configuration file, which holds them for every command, they are fine. The completion offers each command the settings it uses.
* enstate: bash completiontv8 hours3-2/+75
| | | | | | A command until one is given, then the options it takes (each once, but --config and --unset), and for PATH a submission (a directory) or a source list (a file). The package installs it.
* enstate: --pack warns of an entry from text with placeholderstv9 hours3-5/+18
| | | | | | Text loses its trailing line breaks, which a key or a certificate rarely should; a whole-value source (cmd:…, file:…, or a table) takes an entry byte-exact. The warning says so, and the entry goes in as asked.
* enstate: --apply starts the unit that runs --migrate again if it failedtv9 hours4-1/+51
| | | | | | | The setting unit names it (the module: enstate.service). After a boot without state it failed; an accepted --apply starts it (--no-block, with the lock released), so it serves the views and is no longer failed.
* enstate: the state directory is root'stv9 hours3-1/+15
| | | | | | The receptor makes the state directory 0700 whoever created it (a deploy copying into incoming/, say), and the module has tmpfiles keep it so.
* enstate: snapshots flushed to disk before they are put in placetv9 hours1-3/+32
| | | | | | A new snapshot's files and directories are flushed before the link to it is replaced, and the link before the old snapshot goes: a crash leaves the old snapshot or the new one, whole.
* enstate: config with placeholders in parenthesestv11 hours3-2/+9
| | | | | | The config crate at continuum's 34434f7 takes $(env:…), $(cmd:…) and $(file:…) as well as ${…}, so a source list may use either. A test packs a $(cmd: …) source.
* nix: the switch serves the views when there is something to servetv12 hours2-11/+92
| | | | | | | | | | | | | | enstate.service reruns on a switch when the schema changes. A unit of its own, enstate-switch.service, takes what waits otherwise: a submission in incomingDir, or one staged. switch-to-configuration restarts sysinit-reactivation.target on every switch, which starts it, and triggering conditions keep it from running when nothing waits. The check before a switch uses the new generation's enstate, schema and configuration, and runs on a host without enstate, too: its first switch's state can wait in incomingDir. Subtests of the VM test: staged under an unchanged schema, brought by the switch (without the warning the activation-restart-list gives); a waiting submission taken by the switch that needs it; one refused refusing it.
* enstate: submissions waiting for the next switchtv14 hours8-12/+279
| | | | | | | | | | | --migrate first takes the submissions in STATE/incoming, in the order of their names: planned against the schema, stored if accepted (their views follow with the rest), removed, and moved to STATE/refused if refused, which refuses the migration. A dry run (the check before a switch) does so on a copy of the snapshots, changing nothing. --stage leaves a marker, STATE/migrate-due, for the next switch to migrate even if the schema doesn't change; --migrate removes it. Scratch directories are cleaned up without following the symbolic links in them.
* enstate: --stage, a submission for the next generationtv14 hours6-6/+166
| | | | | | | | | | Plans against --schema, stores the snapshot under it, and puts no views in place and runs no reactions: the running generation goes on as it is, keeping what it has no slot for, and the switch (--migrate) brings the new views. The way to fill a required slot a generation adds before switching to it, and to bring a host's first state: with the new system's enstate, schema and configuration. Tests, and a subtest of the VM test that does so.
* docs: submissions for the next generationtv14 hours1-3/+16
| | | | | | | | 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.
* docs: services read views; enstate doesn't configure themtv14 hours1-5/+11
| | | | | | | The sketch of the NixOS side: services point at the views' paths, which the module names, as they like (LoadCredential=, a configuration file); whether they are restarted when a view changes is up to reactions, since a configuration may restart them itself.
* nix: the package, a NixOS module, its VM testtv14 hours5-2/+515
| | | | | | | | | | | | | The module makes the schema from options (/etc/enstate/schema.json), every slot its own view unless it says otherwise, and names the views' paths (read-only `path` options) for the services that read them. It configures none of them: a service whose LoadCredential= reads a view is ordered after the unit that puts the views in place, by itself. That unit runs --migrate at boot and when the schema changes; the check before a switch is --migrate --dry-run against the new schema. The test: a consumer with a LoadCredential= of its own; apply from a source list, rotate, switch across a rename and back, a switch refused, a reboot.
* enstate: the system's configuration firsttv19 hours1-1/+11
| | | | | | /etc/enstate/config.json, if it exists, before --config files and arguments: the NixOS module writes the state and run directories there, so an operator's enstate finds them.
* enstate: reactions after applying, and after a switchtv19 hours6-20/+65
| | | | | | | | | | After applying, units are restarted or reloaded, and started if they aren't running: they may have failed for want of their views. That happens with the store's lock released: a unit restarted may want the one that runs --migrate, which waits for the lock. After a switch, --migrate runs from the unit that units using views are ordered after, so only running units react, without waiting for them (--no-block try-restart, try-reload-or-restart).
* enstate: --migrate, renames both ways, kept entriestv19 hours11-217/+923
| | | | | | | | | | | | | What a generation sees of a snapshot accepted under another schema: same name and type, renamedFrom, a rename in the stored schema read backwards, and entries kept, with their types, in the snapshot's kept/. Plans start from what is seen, and store it under the running schema; a generation change rewrites no snapshot. --migrate (and --dry-run) says what each channel sees, refuses for required slots nothing fills, puts the views in place and runs their reactions; --materialize and --status go by what is seen, too. A view made from an unfilled required slot isn't there. The rollback cases of migrations.md that need no converters or steps are tests.
* docs: what is kept goes once its slot is filled anewtv19 hours1-4/+7
| | | | | | | A kept entry fills a slot of its name and type after a rollback, but once that slot is filled anew it is older than what is there, and goes: the rule of migrations.md case 3, for every kept entry. --migrate takes --dry-run, for the check before a switch.
* enstate: the receptor and the provider, a first versiontv19 hours19-6/+3908
| | | | | | | | | | One program on a library: --plan and --apply of submissions (complete and partial, items required and optional, groups, removal, the chain as order), validators of types and across slots, views put in place by replacing a link, their reactions by systemctl; --status, --materialize; and --pack, a submission from a source list in JSON or TOML, by the config crate's sources. Programs by the protocol of design.md 5.2; tests with shell scripts as validators and renderers.
* docs: required slots before validators, commands as optionstv43 hours1-22/+26
| | | | | | | | | The plan checks that required slots are filled before it runs the validators, so they are given filled slots. The receptor's and the provider's commands are options (--plan, --apply, --pack, ...), as our tools' are. An item in a group is as required as its group, and the manifest has no checksums yet. A plan says of secret views, and of files that aren't text, which files differ, as diffutils does.
* docs: design draft 4, programs and sourcestv44 hours2-125/+340
| | | | | | | | | | A protocol for validators, renderers, converters and steps (a directory with an invocation and channels/CHANNEL/SLOT, objections as JSON lines); every slot holds a file, its type a media type, so format and type versions go; validators across slots; submissions in the same layout, with removal and the chain as order proposed; and enstate pack, with source lists in JSON or TOML by continuum's config crate. Case 2 of migrations.md now has two types and converters between them.
* docs: design draft 3, migrations on papertv3 days3-167/+358
| | | | | | | | Partial submissions with required and optional items and groups, plan before apply, formats by media type, a protocol for renderers, host names by a resolver, refuse as the only policy; and the rule that a generation change never rewrites the snapshot, which the cases in migrations.md need.
* init: design draft 2, state objectstv3 days3-0/+352