Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/ci-node-health.yml
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
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
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[@]}"
Comment thread
key4ng marked this conversation as resolved.
Resolved
3 changes: 3 additions & 0 deletions .github/workflows/pr-test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ jobs:
pip install ./crates/grpc_client/python
pytest -q grpc_servicer/tests

- name: Run CI tooling unit tests
run: pytest -q scripts/tests/test_ci_node_health.py

# CPU-only unit tests for the e2e harness itself (connection-mode parsing,
# ZMQ/EPD command builders, ZMQ-lane collection filter). --noconftest keeps
# e2e_test/conftest.py — which needs the generated smg_client types and a
Expand Down
Loading
Loading