aboutsummaryrefslogtreecommitdiffstats
path: root/src/store.rs
Commit message (Collapse)AuthorAgeFilesLines
* enstate: validators and renderers in a sandboxtv10 hours1-0/+18
| | | | | | | | | | | By bubblewrap: everything read-only but OUT (and IN bound again after a fresh /tmp), a new /dev and /proc, namespaces of their own (no network), no capabilities, a new session, gone with the receptor. The setting sandbox is bwrap (found in the receptor's PATH, as the programs' environment is empty), or none; the module sets its bubblewrap. The tests run their programs in it where bubblewrap can make one (not in Nix's build sandbox), and a test checks that a program can't write outside OUT, nor into IN, and has no network nor environment.
* enstate: the state directory is root'stv11 hours1-1/+5
| | | | | | 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 placetv11 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: submissions waiting for the next switchtv16 hours1-0/+77
| | | | | | | | | | | --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: --migrate, renames both ways, kept entriestv21 hours1-2/+58
| | | | | | | | | | | | | 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.
* enstate: the receptor and the provider, a first versiontv21 hours1-0/+225
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.