host/migrate-host.sh — re-home legacy boxes onto the new stack, then retire the old one #53
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#53
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 0.4.0 transition (#52) is zero-ceremony by design: install + setup-host gives a dual-stack host where legacy boxes (tag
user.claudebox=1, claudenet/10.87, claude-dev) keep working under every verb, and new mints land on boxnet/10.88. Cross-generation isolation holds — inter-bridge traffic is routed, so it traverses both generations' ACLs, and both drop 10.0.0.0/8.Two things that path deliberately does not do, and that deserve a script instead of per-box hatch surgery:
1. Re-home a legacy box onto the new stack
The expensive thing in an old box is its authed state (Claude login, git creds — the whole log-in-once story). Re-homing preserves it without a re-login:
Per-box, ordered, with the same assert-the-effect discipline as the drill (check the box actually resolves and reaches the internet on its new leg before declaring it moved). Also covers snapshots implicitly —
--fromclones of a re-homed box land on the new stack, closing the "clones of old boxes keep the old network alive" loop.2. Retire the legacy stack when its last box is gone
Today the only tools that remove claudenet / claude-dev / claude-isolate / claudebox-firewall.{service,sbin} / the old nft tables are teardown-host.sh and drill/wipe.sh — both of which delete all boxes too. The migrate script's second half: refuse while any
user.claudebox=1box exists, then remove exactly the legacy artifacts and assert their absence (wipe.sh's verdict pattern).Shape
host/migrate-host.sh [--box <name> | --all-boxes] [--retire-legacy], idempotent, one action per invocation, loud about what it did. The re-home steps are the risky half — a box mid-move must not end up tagless or profileless, so order matters: tag first (it is additive and reversible), profile last, verify before declaring.Provenance: operator question after run 15 — "what should I do in a system that has been running old claudebox for a bit?" The dual-stack answer is fine; this issue is the difference between fine and done.
🤖 Generated with Claude Code