bootstrap-vm: inject and refresh host-provided repos from the hypervisor instead of cloning them on the guest #73
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
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#73
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?
bootstrap-vmputs a host-provided repo on the guest from the hypervisor's own checkout, and refreshes it the same way, instead of asking the guest to clone a remote its forge identity may not read.Part of allod/strategy#62.
Primary goals:
bootstrap-vmreads the machine's host-provided marker fromvm-specs.jsonand leaves those repos out of the triples it handsbootstrap-vm-guest.sh, so the guest clone loop no longer dies on them underset -e.bootstrap-vmputs the hypervisor's checkout of each host-provided repo at~/work/<checkout>on the guest over the existing~/.ssh/hostchannel, refusing loudly rather than overwriting a guest tree that has local changes.verify-vm --repairreruns the same step, so the guest copy follows the hypervisor's;lib/vm-health-check.shneeds no change because the checkout exists at its declared path.origin, so guest tools can skip it by inspection; that rule is the contract the allod/tools child builds on.Current state and specifics
scripts/bootstrap-vm-guest.shrenders oneclone_or_pullper repo and runs them underset -euo pipefailon the guest with the guest's forge key (FORGE_SSH_CMD), so a repo the guest identity cannot read ends the bootstrap at that line and every repo after it is skipped.scripts/bootstrap-vmbuilds the triples fromvm-specs.json.reposthroughlib/resolve-repos.shand has no notion of a repo the host should supply;scripts/provision-vmrunsbootstrap-vmthenverify-vm, so such a machine cannot be provisioned at all today. The hypervisor already holds a checkout of every registry repo at its registry path, and the host-to-guest ssh identity is the onerebuild-vmandbootstrap-vmuse.Transport, to decide here:
git pushfrom the hypervisor tossh://<guest>/~/work/<checkout>withreceive.denyCurrentBranch=updateInsteadset on a guest-sidegit init, which refuses a dirty working tree with a clear message; orgit bundle createplusscpand a guest-side clone or fetch. The push is simpler to make idempotent; the bundle is what deployments already do by hand.Scope
In scope:
bootstrap-vm,bootstrap-vm-guest.shargument handling,docs/provisioning-scripts.md, and tests for the skip and the refresh. The marker's name andvm-specs.jsonrendering belong to the allod/inventory child and should be settled first or in the same PR series. Out of scope:rebuild-vmrunning the verifier (allod/nexus#71) and the activation warning (allod/archetypes#127).