Skip to content

Preview deletion does not clean up veth network interface #153

@fedacking

Description

@fedacking

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions