fix(drill): clean the host before setup-host, and bound it #25

Merged
dan-claude-bot merged 1 commit from drill/clean-before-setup into main 2026-07-13 23:10:19 +00:00
dan-claude-bot commented 2026-07-13 23:09:53 +00:00 (Migrated from github.com)

Run 6 stalled in setup-host.sh — which should take seconds on a host that already has Incus. The ordering was simply wrong.

Cleanup ran after setup

setup-host.sh reconfigures claudenet's ACLs. But an aborted earlier run's boxes (archive, peer) were still attached to that network, so incus network set had to push the ACL change onto every live NIC. That same aborted run also left the phase-D mutations in place (dns.mode=none, security.mac_filtering/ipv4_filtering on the profile), so setup was converging against a moving target.

The drill's cleanup — which deletes exactly those boxes and reverts exactly those mutations — ran after setup-host. Backwards.

Now: delete the boxes and revert the mutations first, then run setup-host against a clean-ish host, where it is the no-op it's supposed to be.

And bound it, so a stall is never silent again

  • setup-host.sh gets a 5-minute timeout, and on expiry prints the three things worth checking rather than hanging: instances still attached to the network, the firewall unit, the incus daemon.
  • Every cleanup call gets its own timeout, so a single wedged instance can't stall the run before the drill has printed a line.
  • Any instance left on the host that isn't ours is listed and left alone.

RUNS.md gains this as trap 8: clean before you set up, not after.

Note on the current host

It has been through six runs, four of them aborted, and carries their sediment. If the next run still misbehaves, the honest reset is:

~/.local/share/claudebox/host/teardown-host.sh

then re-run the drill — it will rebuild the network, ACL, profile and firewall from scratch.

🤖 Generated with Claude Code

Run 6 stalled in `setup-host.sh` — which should take **seconds** on a host that already has Incus. The ordering was simply wrong. ## Cleanup ran *after* setup `setup-host.sh` reconfigures `claudenet`'s ACLs. But an aborted earlier run's boxes (`archive`, `peer`) were **still attached to that network**, so `incus network set` had to push the ACL change onto every live NIC. That same aborted run also left the phase-D mutations in place (`dns.mode=none`, `security.mac_filtering`/`ipv4_filtering` on the profile), so setup was converging against a moving target. The drill's cleanup — which deletes exactly those boxes and reverts exactly those mutations — ran **after** setup-host. Backwards. Now: **delete the boxes and revert the mutations first**, then run setup-host against a clean-ish host, where it is the no-op it's supposed to be. ## And bound it, so a stall is never silent again - `setup-host.sh` gets a 5-minute timeout, and on expiry prints the three things worth checking rather than hanging: instances still attached to the network, the firewall unit, the incus daemon. - Every cleanup call gets its own timeout, so a single wedged instance can't stall the run before the drill has printed a line. - Any instance left on the host that isn't ours is listed and left alone. `RUNS.md` gains this as **trap 8: clean before you set up, not after.** ## Note on the current host It has been through six runs, four of them aborted, and carries their sediment. If the next run still misbehaves, the honest reset is: ```sh ~/.local/share/claudebox/host/teardown-host.sh ``` then re-run the drill — it will rebuild the network, ACL, profile and firewall from scratch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/box#25
No description provided.