Drop the -from-host suffix from the nexus host scripts #67
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/nexus!67
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/rename-host-scripts"
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?
Every nexus provisioning script loses its
-from-hostsuffix. On a running nexus, once the deploy pin picks this up, the operator typesrebuild-vm <vm>,provision-vm <vm>,verify-vm <vm>, andbootstrap-vm <vm>; the old names are gone, not aliased. The guest payload thatbootstrap-vmstreams over SSH is nowbootstrap-vm-guest.sh, so the only script that does not run on the host is the one whose name says where it runs. Script bodies, arguments, and the environment pointers (DEPLOY_FLAKE,INVENTORY_CHECKOUT,KNOWN_HOSTS_VMS,NIXOS_REBUILD, ...) stay identical; only the two test-facing env seams follow the rename (BOOTSTRAP_VM_FROM_HOSTtoBOOTSTRAP_VM,VERIFY_VM_FROM_HOSTtoVERIFY_VM). The flake check proves it: shellcheck and every test suite pass over the renamed files, and the check asserts the installedbin/binary for each of the four host commands. If it is wrong, revert the two commits; nothing outside this repo changes.Closes allod/nexus#66
What changes
scripts/rebuild-vm-from-hostscripts/rebuild-vmscripts/provision-vm-from-hostscripts/provision-vmscripts/verify-vm-from-hostscripts/verify-vmscripts/bootstrap-vm-from-host.shscripts/bootstrap-vmprovision-vmandverify-vm --repairscripts/bootstrap-vm.shscripts/bootstrap-vm-guest.shtests/rebuild-vm-from-host.shtests/rebuild-vm.shtests/provision-vm-from-host.shtests/provision-vm.shBOOTSTRAP_VM_FROM_HOST/VERIFY_VM_FROM_HOSTBOOTSTRAP_VM/VERIFY_VMprovision-vmused by its testEvery usage line, printed hint, call site, flake check entry, package assertion, option description, test pattern, and doc in this repo follows. Two small additions beyond the pure rename: the flake check gains
test -x .../bin/bootstrap-vmalongside the other three host commands, anddocs/provisioning-scripts.mdlistsbootstrap-vmamong the operator's commands.Not in this PR, tracked in the issue's Scope: the rebuild hint printed by
allod secret rotateinallod/tools, the provisioning commands quoted inallod/vmdocs, and theprovision-vm-from-hostmention inallod/memory. Those keep printing the old names until their follow-ups land after this reaches the host through the deploy pin.Risk
R1. Refactor-only rename of five scripts and two test files; behavior untouched; rollback is a straight revert of two commits. The worst credible failure after validation is an operator or a private note typing an old name and getting
command not found, which is the intended outcome of dropping the aliases. No secrets, host-only commands, provisioning behavior, persistent state, or cross-repo ordering are touched.Validation
nix build .#checks.x86_64-linux.provisioning-contract: passed. That check runsbash -nandshellcheck -x --source-path=SCRIPTDIRover the full script list, every test suite, and thetest -x bin/<name>assertions forbootstrap-vm,provision-vm,rebuild-vm, andverify-vm.tests/bootstrap-orchestration.sh9 passed,tests/provision-vm.sh8 passed,tests/forge-ssh-key.sh10 passed,tests/registry-resolver.sh15 passed,tests/provisioning-contract.sh3 passed.nix build .#packages.x86_64-linux.provisioning-scriptsandls bin/:bootstrap-vm,bootstrap-vm-guest.sh,provision-vm,rebuild-vm,verify-vm; no-from-hostname present.grep -rn from-hostandgrep -rn FROM_HOSTover the worktree: no matches.