Skip to content

Fail closed when health and identity checks match no clients - #224

Open
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix-min-client-count-vacuous-pass
Open

Fail closed when health and identity checks match no clients#224
damilolaedwards wants to merge 1 commit into
ethpandaops:masterfrom
damilolaedwards:fix-min-client-count-vacuous-pass

Conversation

@damilolaedwards

Copy link
Copy Markdown

Summary

check_clients_are_healthy and check_consensus_identity both derive a required pass count from minClientCount, falling back to the total number of matched clients when it is left unset. With zero matched clients that fallback collapses to zero, and zero passing clients out of a zero requirement reads as a pass. A typo in clientPattern or an EL-only pool (identity checks skip clients with no consensus client before counting them) both report every client healthy or identity-verified having checked none of them.

check_clients_are_healthy hits this by default, since minClientCount has no default value. check_consensus_identity defaults minClientCount to 1, so it only reaches the same bug once a playbook explicitly overrides that with minClientCount: 0.

This change requires at least one matched client before a pass is possible in both tasks. An empty match now falls through to the same not-yet-passing path a genuinely failing client already takes: keep polling, or fail outright if failOnCheckMiss is set.

Test plan

  • Added tests covering zero matched clients at each task's default config, an explicit failOnCheckMiss case for the healthy check, and an explicit minClientCount: 0 override for the identity check.
  • go build ./...
  • go vet ./...
  • go test ./pkg/tasks/check_clients_are_healthy/... ./pkg/tasks/check_consensus_identity/...

check_clients_are_healthy and check_consensus_identity both derive a
required pass count from minClientCount, falling back to the total
number of matched clients when it is left unset. With zero matched
clients that fallback collapses to zero, and zero passing clients out
of a zero requirement reads as a pass. A typo in clientPattern or an
EL-only pool (identity checks skip clients with no consensus client
before counting them) both report every client healthy or identity-
verified having checked none of them.

check_clients_are_healthy hits this by default, since minClientCount
has no default value. check_consensus_identity defaults minClientCount
to 1, so it only reaches the same bug once a playbook explicitly
overrides that with minClientCount: 0.

Require at least one matched client before a pass is possible in both
tasks. An empty match now falls through to the same not-yet-passing
path a genuinely failing client already takes: keep polling, or fail
outright if failOnCheckMiss is set.
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