Skip to content

teardown should refuse while the daemon holds the pidfile #27

Description

@CMGS

Problem

cocoon-net teardown removes the cloud allocation (ENIs / alias range) out from under a running DHCP server. VMs that obtain leases afterwards are silently unroutable, and nothing tells the operator that the daemon was still running.

Proposal

Reuse checkExistingPID in runTeardown and fail with "stop cocoon-net daemon first", with a --force escape hatch.

Acceptance

cocoon-net teardown exits non-zero with that message while the daemon runs, and succeeds after systemctl stop cocoon-net.

Found in the 2026-09-21 whole-repo review round (branch review/whole-repo-2026-09-21). Filed as a behaviour question for the owner; no code change is included in the round PR.

Activity

  1. CMGS commented on Sep 21, 2026

    @CMGS
    ContributorAuthor

    Fixed in 99794e4 on the review branch (PR #28): teardown refuses while the daemon holds the pidfile: checkExistingPID after the dry-run branch, --force skips the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions