Skip to content

Populate last_liveness_error with actual probe failure details #114

@peter-adam-dy

Description

@peter-adam-dy

Problem

NodeState.last_liveness_error exists in the state but is never populated with meaningful error details. The liveness check function returns a bare bool with no error information. The field is always None or the fallback string "liveness probe failed".

Proposed fix

Change run_single_liveness_check() to return Result<(), String> instead of bool. On failure, capture the error details (exit code for command checks, connection error for port/http checks) and store them in last_liveness_error. This makes veld status output and the Unhealthy broadcast events more useful for debugging.

Context

Identified during review of #111 (liveness probes).

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