Skip to content

local remove running-server guard only checks the current project #600

Description

@sdairs

Discovered during v0.4.2 post-merge stress testing.

Repro

  1. Start servers on the default version from project dir A (local server start dev etc.).
  2. From project dir B, run chctl local remove <that-version>.

Actual

Exit 0 — the binary is deleted from under 3 running servers. The servers keep running (open fds), but local client -n dev then fails with managed_client_binary_not_found.

Root cause: remove() (crates/clickhousectl/src/local/mod.rs:200-205) calls recover_current_project_servers() then filters list_running_servers(), which is project-scoped. Servers in other projects are invisible. The guard works correctly when run from the same project (exit 1, server_running).

Expected

local remove --help says "Fails if a local server is currently running on this version" — enumerate servers across all projects (the local server list --global machinery already exists).

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglocalAffects local CLI commands

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions