Repository navigation
ci: hourly H100 node health monitor with issue-based alerts #2587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
aae765e
feat(ci): node health monitor: check registry and Prometheus evaluators
key4ng 0d49898
feat(ci): node health monitor: GitHub runner-queue evaluators
key4ng f838d67
feat(ci): node health monitor: reconcile findings into GitHub issues
key4ng a9a1b57
feat(ci): node health monitor: fleet summary and entry point
key4ng 395c4ec
ci: hourly H100 node health workflow with issue-based alerts
key4ng f216941
fix(ci): count unattributed minutes for the GPU memory leak check
key4ng f73b9d4
ci: quote the node health dry-run flag for shellcheck
key4ng 8ae86d0
fix(ci): node health monitor: address review findings
key4ng 6bfb1ec
fix(ci): node health monitor: second review round
key4ng 5fc5083
fix(ci): preserve acknowledged GPU events and validate closed issue s…
key4ng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: CI node health | ||
|
|
||
| # Hourly health check of the H100 CI nodes. Evaluates Prometheus (NPD, DCGM, | ||
| # node-exporter, kube-state-metrics) and the GitHub Actions queue, and keeps one | ||
| # GitHub issue per active problem under the `ci-node-health` label. Slack hears | ||
| # about it through the GitHub Slack app: | ||
| # /github subscribe smg-project/smg issues label:"ci-node-health" | ||
| # Docs: scripts/k8s-runner-resources/README.md, section "CI node health monitor". | ||
| # | ||
| # Runbook (issue title -> first action; the issue body repeats it): | ||
| # [CRIT] H100 node not Ready kubectl describe node; cordon + OCI ticket if not back in 15 min | ||
| # [CRIT] NPD hardware condition kubectl cordon; read the condition message; OCI hardware ticket | ||
| # [CRIT] GPU XID error dmesg | grep -i xid on the node; close the issue yourself when handled | ||
| # [CRIT] GPU row-remap failure cordon; OCI hardware ticket | ||
| # [CRIT] Node disk over 85% root: delete finished runner pods, crictl rmi --prune; /raid: prune hub/ | ||
| # [CRIT] GPU runner label starved kubectl get autoscalingrunnersets -n actions-runner-system; listener logs | ||
| # [CRIT] Monitor cannot reach Prometheus kubectl -n monitoring get pods | grep prometheus | ||
| # [WARN] H100 node cordoned intentional? assign the issue to yourself. else kubectl uncordon | ||
| # [WARN] GPU jobs waiting for runners free GPUs or raise maxRunners in scripts/k8s-runner-resources | ||
| # [WARN] NPD condition Unknown kubectl -n monitoring logs <npd pod> | grep -iE 'timeout|not RDMA' | ||
| # [WARN] GPU memory held by no pod nvidia-smi --query-compute-apps on the node; kill the orphan | ||
| # [WARN] GPU over 85C check clocks/power; OCI ticket if it persists idle | ||
| # [WARN] Workflow runs queued over 24h gh run cancel <id>; fix the runs-on label | ||
| # | ||
| # State findings close on their own after two clean runs. XID issues are closed by a human. | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '17 * * * *' # hourly, off the round hour | ||
| workflow_dispatch: | ||
| inputs: | ||
| dry_run: | ||
| description: Print the issue operations without writing any issue | ||
| type: boolean | ||
| default: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-node-health | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| check: | ||
| # Must run in the cluster: Prometheus is only reachable on its ClusterIP. | ||
| runs-on: ${{ vars.SMG_RUNNER_CPU || 'k8s-runner-cpu' }} | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| issues: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| sparse-checkout: scripts/ci_node_health.py | ||
| sparse-checkout-cone-mode: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Evaluate node health and reconcile issues | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| PROM_URL: http://prometheus-kube-prometheus-prometheus.monitoring.svc:9090 | ||
| DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }} | ||
| run: | | ||
| args=() | ||
| if [ "$DRY_RUN" = "true" ]; then args+=(--dry-run); fi | ||
| python3 scripts/ci_node_health.py "${args[@]}" | ||
|
key4ng marked this conversation as resolved.
Resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.