[Bug]: ClusterPolicy isDaemonSetReady can report Ready from a DaemonSet status of an older generation
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, kubernetes
調査の方向性
controllers/object_controls.go の約4030行目にある isDaemonSetReady から始めて、すでに修正済みの internal/state/state_skel.go の版と比較してください。後者は status.observedGeneration を metadata.generation と照合しています。同じガードを追加し、generation が観測されるまで ClusterPolicy のパスが準備未完了を返すようにしてください。スケジュール対象の Pod 数が 0 の場合も含みます。generation 2、observedGeneration 1、desiredNumberScheduled 0 の単体テストが準備未完了を報告すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
#2968 fixed internal/state/state_skel.go:isDaemonSetReady to require status.observedGeneration >= metadata.generation. The ClusterPolicy implementation in controllers/object_controls.go:4030 still lacks that check:
- line 4040 returns Ready whenever
status.desiredNumberScheduled == 0, including for a DaemonSet whose status the DaemonSet controller has not populated yet; - line 4045 trusts
status.numberUnavailablebefore the new generation is observed.
A freshly created or just-updated operand DaemonSet can therefore be reported Ready on the first reconcile pass, so ClusterPolicy can flip Ready → NotReady and later states proceed before the operand is actually scheduled.
To Reproduce
Found by code review; not yet reproduced on a cluster. Unit-level: call isDaemonSetReady with a DaemonSet with generation: 2, status.observedGeneration: 1, desiredNumberScheduled: 0 → returns Ready.
Expected behavior
Same semantics as the fixed state_skel implementation: not ready until observedGeneration >= generation.
Suggested fix
Add the observedGeneration guard, or share one readiness helper between the ClusterPolicy and NVIDIADriver/GPUCluster stacks.
Environment (please provide the following information):
- GPU Operator Version: main @ f806d6b (code inspection)
- 主要言語
- Go
- スター
- 2.9k
- フォーク
- 576
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 78
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/gpu-operator のほかの issue
-
feature lifecycle/frozen needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/gpu-operator#3074 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NVIDIA/gpu-operator#3065 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: GPUCluster common name label breaks DRA validator selector対応中かも @ajavanma が 24 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/gpu-operator#2955 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: driver-validation hides why a pre-installed driver failed and loops without a reason対応中かも @fjvbn2003 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/gpu-operator#3085 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: container-toolkit DaemonSet: containerd-socket hostPath volume lacks mountPropagation: HostToContainer, pins host ZFS mounts and blocks zfs destroy ("dataset is busy")対応中かも @akhil9tiet が 1 日前に担当しました。 オープンbug needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
NVIDIA/gpu-operator#3083 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/gpu-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
apache/rocketmq-dashboard#6895 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
777genius/agent-notifications#490 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devantler-tech/ksail#7836 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
keyxmakerx/Chronicle#1469 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信