fix: the clone identity reset could never reboot, so it never took effect #30

Merged
dan-claude-bot merged 1 commit from fix/reset-identity-restart into main 2026-07-14 00:05:48 +00:00

1 commit

Author SHA1 Message Date
4e2c6c9caf fix: the clone identity reset could never reboot, so it never took effect
The reset truncated /etc/machine-id and called 'incus restart'. But
systemd needs a VALID machine-id to shut down cleanly — so the graceful
stop hung, incus timed out ("Failed shutting down instance, status is
Running: context deadline exceeded"), and the reboot never happened. The
clone kept its source's machine-id, hence its DUID, hence its DHCP
lease: two boxes on one address, which is the exact bug the reset exists
to prevent. Worse, the duplicate address then broke the box's networking
outright ("box cannot reach the internet"), and poisoned the isolation
run downstream.

Write a fresh VALID id with systemd-machine-id-setup instead of emptying
the file — in a VM it derives from the DMI product UUID, which Incus
makes unique per instance. Then restart with a real timeout and a forced
fallback: a clone that keeps its source's lease is worse than an unclean
stop of a box that booted thirty seconds ago.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 00:03:21 +00:00