Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#3,060 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@efegokdemir đang làm issue này rồi.

Từ ngày 14/10/2026.

  • #3079 của @efegokdemir — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes
Lĩnh vực
infrastructure

Hướng nghiên cứu

Bắt đầu từ isDaemonSetReady trong controllers/object_controls.go, khoảng dòng 4030, rồi so sánh với phiên bản đã được sửa trong internal/state/state_skel.go, nơi kiểm tra status.observedGeneration so với metadata.generation. Thêm cùng một lớp bảo vệ để đường dẫn ClusterPolicy trả về chưa sẵn sàng cho đến khi generation được quan sát, kể cả trường hợp số pod được lên lịch bằng không. Hoàn thành khi một unit test với generation 2, observedGeneration 1 và desiredNumberScheduled 0 báo chưa sẵn sàng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)
Ngôn ngữ chính
Go
Star
2.9k
Fork
576
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
90

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/gpu-operator

Tất cả issue của NVIDIA/gpu-operator

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.