Skip to content

Fix transient API failures in node validation - #1152

Merged
carlotaarvela merged 3 commits into
mainfrom
carlota/validate-nodes-transient-api-retry
Apr 28, 2026
Merged

carlotaarvela merged 3 commits into
mainfrom
carlota/validate-nodes-transient-api-retry

Conversation

@carlotaarvela

@carlotaarvela carlotaarvela commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

The validate_clusterloader2 function in large_cluster.py crashes on transient Kubernetes API errors (503, 504, connection timeouts) during the node readiness check. This causes entire pipeline runs to fail even when the cluster is nearly ready.

Example from the cnl-observability scheduled run on 2026-04-27: the cluster had 1003/1006 nodes ready when a single 503 Service Unavailable (upstream connect error or disconnect/reset before headers. reset reason: connection timeout) killed the run.

Root Cause

get_ready_nodes() was called without exception handling. At large scale (1000+ nodes), transient API server errors are expected. The API server may briefly become unavailable due to load, connection resets, or upstream proxy timeouts.

Fix

Wrap get_ready_nodes() in a try/except block that catches transient exceptions, logs them, and retries after a short sleep. The existing timeout loop already provides a natural retry boundary — if the API stays down beyond the configured timeout, the function still fails as expected.

Impact

  • Prevents intermittent pipeline failures on large clusters (1000+ nodes)
  • No behavior change for persistent failures — the timeout still applies
  • Affects validate_clusterloader2 only; execute/collect phases are unchanged

Test run for this change https://dev.azure.com/akstelescope/telescope/_build/results?buildId=65283&view=results

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the large-cluster ClusterLoader2 validation step against transient Kubernetes API failures during the node readiness check, reducing flaky pipeline failures on very large clusters.

Changes:

  • Wraps KubernetesClient.get_ready_nodes() in validate_clusterloader2 with a retry-on-exception loop.
  • Logs transient query failures and waits before retrying within the existing overall timeout window.

@carlotaarvela
carlotaarvela merged commit 119f0ad into main Apr 28, 2026
3 checks passed
@carlotaarvela
carlotaarvela deleted the carlota/validate-nodes-transient-api-retry branch April 28, 2026 09:21
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.

3 participants