fix: a clone must not inherit its source's identity (two boxes, one IP) #27

Merged
dan-claude-bot merged 1 commit from fix/clone-identity into main 2026-07-13 23:33:28 +00:00

1 commit

Author SHA1 Message Date
793f499178 fix: a clone must not inherit its source's identity
Two boxes cloned from one snapshot came up holding the SAME IP address —
10.87.0.128, on the same dnsmasq lease, matching to the second on the
lease timer. Incus does regenerate the MAC (they differed), but
/etc/machine-id rides along inside the disk image, and systemd derives
its DHCP client identifier from it. Same client-id, same lease.

This breaks the workflow claudebox exists for: log in once, snapshot,
clone forever. Every clone of a snapshot is, to the network, the same
machine as its source and as its siblings.

Truncating /etc/machine-id makes systemd mint a fresh one at next boot,
so the clone path now resets it and restarts before handing the box
over. Costs one reboot; the alternative is colliding boxes.

Found by the drill on a live host (#26) — and it also explains why the
sibling-isolation probe (#15 A3) could never work: it was aiming box A
at box A's own address.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 23:31:32 +00:00