bind a container apply to the closure realised for the agent, and record the deployed pins on drift
hive-priv applies only the path its last RealiseClosure returned for that agent. On drift the swap and create record the pins of the commit the closure was built from.
This commit is contained in:
parent
4590b04cac
commit
6b800600e2
1 changed files with 338 additions and 71 deletions
|
|
@ -47,8 +47,14 @@ Each module's `//!` header lists its ops.
|
|||
`container_toplevel_action` (in `src/container.rs`) applies a closure that is
|
||||
already in the store; hive-priv builds nothing. hive-c0re names the closure
|
||||
(`toplevel` on `CreateContainer` / `UpdateContainer`), downloaded beforehand
|
||||
with `RealiseClosure`, and hive-priv accepts it only in the shape of a store
|
||||
path.
|
||||
with `RealiseClosure`. hive-priv remembers, per agent, the path its last
|
||||
successful `RealiseClosure` returned (in memory), and applies only that path to
|
||||
that agent. It refuses a path never realised for the agent, another agent's
|
||||
and the host's own, and logs an error naming the agent and both paths. A
|
||||
restart between the download and the apply empties the record, so the apply
|
||||
fails and the job retries. hive-priv does not re-check the signature at apply
|
||||
time: `RealiseClosure` enforces it, and the binding limits an apply to what that
|
||||
call stored.
|
||||
|
||||
`create` passes the path to `nixos-container create --system-path`, so
|
||||
`nixos-container`'s own `buildFlake()` never runs. Without the flag, it builds
|
||||
|
|
|
|||
Loading…
Reference in a new issue