fix(chainsaw): guard DaemonSet health checks against stale rollouts - #2453
fix(chainsaw): guard DaemonSet health checks against stale rollouts#2453mikecook wants to merge 3 commits into
Conversation
Recipe evidence checkNo leaf overlays affected by this PR. This gate is warning-only and never blocks merge. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates multiple DaemonSet health checks to require scheduled, ready, updated, and generation-synchronized rollouts. NV Sentinel tests add stale-rollout fixtures and failure cases for two DaemonSets. Generated stock-render and recipe catalog golden files contain updated overlay digests. Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change tightens DaemonSet health checks to reject stale rollouts while preserving healthy fully current rollouts; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
numberReady alone can't distinguish a node still running a DaemonSet's previous revision (also Ready) from a fully current rollout, an existing gap in six health checks (gke-nccl-tcpxo x2, aws-efa, nvidia-dra-driver-gpu, nfd, slinky-topograph, nvsentinel): a node still on the previous revision reports Ready too, so none of them could tell a current rollout from a stale one. Add an updatedNumberScheduled/observedGeneration guard to all of them. Signed-off-by: Mike Cook <micook@nvidia.com>
32c4480 to
a42f505
Compare
Summary
Guards six DaemonSet-based chainsaw health checks (gke-nccl-tcpxo x2, aws-efa, nvidia-dra-driver-gpu, nfd, slinky-topograph, nvsentinel) against a stale rollout passing as healthy.
Motivation / Context
numberReady alone can't distinguish a node still running a DaemonSet's previous revision (also Ready) from a fully current rollout — a node on the previous revision reports Ready too, so none of the six checks could tell a current rollout from a stale one. Adds an updatedNumberScheduled/observedGeneration guard to all of them.
Fixes: N/A
Related: #1222 (established the numberReady > 0 vacuous-pass rationale this follows)
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Implementation Notes
Each check's DaemonSet assertion gains two additional JMESPath conditions alongside the existing numberReady == desiredNumberScheduled: updatedNumberScheduled == desiredNumberScheduled and observedGeneration == metadata.generation. Both are omitempty status fields, so they're compared with the (
field||0) pattern rather than a bare equality, consistent with the existing desiredNumberScheduled > 0 vacuous-pass guard from #1222.nvsentinel/health-check.yaml required new check entries rather than a small diff (hence the +46/-0), and pkg/chainsaw/nvsentinel_check_states_test.go was extended to cover the new assertions. Golden files (stock_render_golden.yaml, catalog_parity_golden.yaml) are regenerated output from the health-check.yaml changes — regenerate with make update-goldens if this drifts further before merge.
Testing
All stages passed (test-coverage, lint, tuning-check, coverage-check, e2e, scan, license-check, api-diff). pkg/chainsaw package coverage: 81.9%. scan surfaced only pre-existing low/unknown-severity findings unrelated to this change (GO-2025-3547 low, GO-2026-5932 unknown) — no new highs.
Risk Assessment
Rollout notes: N/A — tightens existing health-check assertions only; a currently-passing, fully-rolled-out DaemonSet is unaffected. A cluster mid-rollout will now correctly fail the check instead of a false pass, which is the intended behavior change.
Checklist
make testwith-race)make lint)git commit -S)