| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
A slot's source says where a deployment gets its entry, on the deploying
host: a source, or { location = NAME; VAR = …; }. enstate.locations
holds locations for every source list, and enstate.sourceLists, read
only, gives a source list per channel from the slots with a source,
complete if every slot of the channel has one: for the deploying host
to evaluate and pack, not part of the system. As hrm's own module had
it, so hrm can use this instead.
|
| |
|
|
|
|
|
|
|
| |
A generation whose required slots the state can't fill doesn't become
the next boot's default either: tools like Clan run switch-to-configuration
boot before switch, so the check refused only once the generation was the
boot default already. Staging a generation for a later reboot works by a
submission waiting in incomingDir, which the check plans. dry-activate
stays unchecked. A line of the VM test (not run).
|
| |
|
|
|
|
|
|
| |
Names starting with a dot are skipped there, so a provider copies a
submission under one and renames it within the incoming directory: a
receptor looking at it meanwhile (enstate.service, a check) never sees
half a submission. Said in the design, the module's incomingDir, the
store; and a test that a dot name is left alone.
|
| |
|
|
|
|
|
|
|
| |
A source declared once (locations, or in files of them the source list
includes), which items use by name: their other fields are its
variables, $(var:NAME) in its placeholders, as data (continuum's config
at 45b0676). Its paths are relative to the file that declares it. A
location that doesn't exist, a variable that isn't text, fields without
a location, a location declared twice are errors.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
The receptor makes the state directory 0700 whoever created it (a
deploy copying into incoming/, say), and the module has tmpfiles keep it
so.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
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.
|