fix: a clone must not inherit its source's identity (two boxes, one IP) #27
No reviewers
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#27
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/clone-identity"
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?
Two boxes cloned from one snapshot came up holding the same IP address. Confirmed live on the drill host (#26):
Incus does regenerate the MAC — they differ. But
/etc/machine-idrides along inside the disk image, and systemd derives its DHCP client identifier (DUID) from it. Same client-id → dnsmasq hands the clone its source's lease. (That machine-id isarchive's original Incus UUID — baked in at its first boot, cloned ever since.)Why this matters more than it looks
This breaks the workflow claudebox exists for. From the README: log in once, snapshot, clone forever. Every box cloned from that snapshot is, to the network, the same machine as its source and as its siblings. Two clones running at once collide; DHCP hands them one address between them.
It also silently sabotaged the audit: #15's sibling-isolation probe (A3) was aiming box A at box A's own address. Six runs, never fired — and had it fired, a self-connection would have been reported as an isolation failure.
The fix
Truncating
/etc/machine-idmakes systemd mint a fresh one on the next boot. Sonew --fromnow resets identity and restarts before handing the box over:Costs one reboot on clone. The alternative is colliding boxes.
Verifying it
On a host with a snapshot to clone from:
Found by the drill on a live host — the kind of bug a fresh test server would have hidden and a stubbed test could never have produced.
🤖 Generated with Claude Code