Problem
When a preview is destroyed via cmd_destroy() in preview.sh, the virtual ethernet interface pair (ve-<slug>) is not removed. nixos-container destroy does not always clean up the veth, leaving orphaned interfaces on the host.
Impact:
- Subsequent attempts to create a preview with the same slug fail with
EEXIST
- Orphaned veth interfaces accumulate on the system
- Same issue exists in the rebuild path of
cmd_update()
Location: server-config/preview.sh lines 619-660 (cmd_destroy())
Proposed Fix
Add veth cleanup after nixos-container destroy in both cmd_destroy() and cmd_update():
ip link delete "ve-${slug}" 2>/dev/null || true
Note: A fix already exists on branch fix/make-update-rebuild-config (PR #145) but has not been merged to main.
Problem
When a preview is destroyed via
cmd_destroy()inpreview.sh, the virtual ethernet interface pair (ve-<slug>) is not removed.nixos-container destroydoes not always clean up the veth, leaving orphaned interfaces on the host.Impact:
EEXISTcmd_update()Location:
server-config/preview.shlines 619-660 (cmd_destroy())Proposed Fix
Add veth cleanup after
nixos-container destroyin bothcmd_destroy()andcmd_update():