8000 fix(metrics): exit when exporter endpoints cannot bind by loglapa · Pull Request #2187 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

fix(metrics): exit when exporter endpoints cannot bind - #2187

Open
loglapa wants to merge 1 commit into
Altinity:0.28.0from
loglapa:fix/2178-exporter-bind-errors
Open

loglapa wants to merge 1 commit into
Altinity:0.28.0from
loglapa:fix/2178-exporter-bind-errors

Conversation

@loglapa
@loglapa loglapa commented Dec 4, 2026
Copy link
Copy Markdown

The metrics exporter currently stays alive when an endpoint cannot bind because the listener error is discarded. Bind both required sockets before serving, release the metrics socket if the separate CHI bind fails, and return an endpoint-specific error so the command exits with status 1.

Related to #2178. This addresses bind failures; it does not add a health endpoint. PR #2133 changes the mux in the same block and can be combined with this startup handling.

Validation: reproduced all three occupied-port cases with the original binary in Linux ARM64 Docker; the patched binary exits with status 1 for shared metrics, split CHI, and secure split CHI conflicts. Plain/secure shared/split endpoint checks and restart after port release pass. The real exporter used a loopback Kubernetes API fixture. Affected Go packages pass, including 20 race-detector runs of the bind/cleanup regression.

Important items to consider before making a Pull Request

  • All commits in the PR are squashed.
  • The PR targets the next-release branch (0.28.0), not master.
  • The PR is signed (DCO and SSH signature).

Signed-off-by: Vladislav Lapin <51929896+loglapa@users.noreply.github.com>
@alex-zaitsev
alex-zaitsev self-requested a review December 4, 2026 10:44

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0