Export the microVM QMP socket path constructor beside the launcher that removes it #27
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/nexus#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The string that decides where a microVM's QMP control socket lives is written in
allod/archetypes, while the code that recursively removes the resulting directory lives inallod/nexus. Export the path constructor fromallod/nexusbeside that removal, so one repository owns both the convention and therm -rfthat acts on it.Primary goals:
Current state and specifics
allod/archetypesowns the literal. On theagent/microvm-host-guest-joinbranch,flake.nix:106definesmicrovmQmpSocketRoot = "/run/allod/microvm-qmp",flake.nix:900renders each guest'smicrovm.socketfrom it, andflake.nix:877asserts thatnexus.microvm.hostPlaintextRootis not nested inside it.allod/nexushardcodes nothing. It derives the directory from whatever the guest declared —qmpDirectory = builtins.dirOf qmpSocketatnix/microvm/host.nix:84— and the per-VM post-stop hook removes it recursively atnix/microvm/launcher.nix:340, alongside the prepared credential directory and the staging directory.This closes no current gap, and the issue should not be read as one. Contract 8 already prevents silent drift of the split. Nexus duplicates no literal, so there is no second copy to fall out of sync. The overlap assertion compares the archetypes literal against itself, both sides sourced from one string in one file. The behavioural witness that the removal touches nothing but what the launcher prepared already exists in
checks/microvm/isolation.nix, subtest "post-stop removes only what the launcher prepared", which stops one of two running guests and asserts the sibling's QMP socket, the sibling's prepared credential, the rollback slot, the volume image and the plaintext mount all survive.What the move buys is locality. A reader auditing the recursive delete would see the convention that decides its target in the same file, instead of inferring it from an assertion in another repository.
Trigger
Take this up when a second consumer needs to know the QMP root, or when the socket layout stops being a fixed value. The pull request allod/archetypes#39 declined to make it configurable on the grounds that a fixed value cannot be misaimed; that reasoning stops holding the moment it is settable, and at that point the constructor's location decides how many places have to change together. Absent either condition the current split is correct, and this is a recorded alternative rather than pending work.
Scope
In: exporting a path constructor from
allod/nexusbeside the launcher, having theallod/archetypesjoin consume it, and keeping the rendered socket path byte-identical across the move.Out: making the QMP root configurable, which allod/archetypes#39 ruled against. Out: any change to the removal hook or its isolation check. Out: the overlap assertion's placement, which follows the constructor rather than being decided separately.
Recorded from the owner review of allod/archetypes#39, which ruled this a defensible follow-up rather than a blocker. Part of allod/strategy#20.