Wait for current DaemonSet status before reporting readiness - #2969
rajathagasthya merged 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/gpu-operator/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughFor DaemonSets with nonzero desired nodes, readiness now requires Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The change waits for the DaemonSet controller to observe the current generation before reporting nonzero workloads ready, while preserving the reported zero-node behavior. No merge-blocking issue is identified. Comment |
|
I checked this against the existing readiness flow and the scope looks appropriately narrow. Putting the The I would also keep the comparison as I don't see a blocking scope issue in this diff. |
|
/ok to test 87dadc6 |
kvalliyurnatt
left a comment
There was a problem hiding this comment.
Thanks for your contribution. LGTM
|
@sylvesterkaczmarek Please squash your commits into a single commit and make sure you |
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
7b29af7 to
aeb59ce
Compare
|
Done. I rebased onto current main and squashed the branch to a single commit, aeb59ce, with the required Signed-off-by trailer. The commit is GitHub Verified, DCO is green, the PR remains approved, and the full internal/state package passes locally. Ready for the remaining maintainer/runner checks. |
|
/ok-to-test aeb59ce |
Description
Fixes #2968.
Require the DaemonSet controller to have observed the current generation before nonzero desired/available/updated counts can establish readiness. Previously, generation 3 with observedGeneration 2 and matching counts of 2 was accepted as ready even though those counts describe the previous template.
The zero-node path already checks the generation, as does Deployment readiness. This adds the same requirement to the nonzero DaemonSet path without changing pod-count checks, rollout strategy, reconciliation writes, or zero-node behavior. Kubernetes defines the status field in its DaemonSet API reference.
The existing
TestIsDaemonSetReadyStaleGenerationdeliberately characterized this known gap by expecting true. It now requires false. New cases cover initial/stale/current/newer observed generations, incomplete counts, zero-node compatibility, and a real state-aggregation transition after a fake-client status update. No existing test is removed or skipped.Newly reproduced on main
60526e35and reported on 25 September 2026. Issue #2968 was rechecked for assignments and competing work. The open Service/ServiceAccount reconciliation patches touch other methods in the file and are independent of this correction.Testing
make unit-test, including its build prerequisite, passes on macOS arm64 with Go 1.27.1.make fmtreports no formatting changes.internal/statesuite passes with the race detector on both macOS and Linux arm64: 280 passing test/subtest events, no failures or skips. Linuxgo vetalso passes.git diff --checkpasses. The commit is signed off and its signature is verified by GitHub.make fmt make unit-test go test -race -count=1 ./internal/state golangci-lint run ./...The last command passes on Linux as described above. Live-cluster and GPU integration were not run. API definitions, generated assets, module files and vendor contents are unchanged; their regeneration targets were not run for this implementation-only correction.
Checklist