Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: ClusterPolicy isDaemonSetReady can report Ready from a DaemonSet status of an older generation

オープン 初心者向け
#3,060 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@efegokdemir がすでに取り組んでいます。

2026年10月14日 から。

  • #3079 @efegokdemir による — オープン

評価

難易度
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 の本文から書いたものです。

説明

bug needs-triage

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.numberUnavailable before 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/gpu-operator のほかの issue

NVIDIA/gpu-operator の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。