settings.py flaps between reconciles: needsMigrationSetting depends on map iteration order
Đá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
- Lĩnh vực
- infrastructure
Hướng nghiên cứu
Đọc controllers/repo_manager/secret.go, bắt đầu với needsMigrationSetting() và cách hàm này sử dụng MigrationSettingsList(). Kiểm tra các bài kiểm thử liên quan trước khi thực hiện thay đổi. Công việc được xem là hoàn tất khi settings.py được tạo ổn định qua các lần reconcile và mọi thiết lập được đặt thành true đều được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
Operator 1.3.0. The same code is on main.
Describe the bug
needsMigrationSetting() in controllers/repo_manager/secret.go builds part of settings.py by ranging over MigrationSettingsList(), which is a Go map, and it returns at the first setting that is false.
Go randomizes map iteration order. With redirect_to_object_storage: true and hide_guarded_distributions: false, REDIRECT_TO_OBJECT_STORAGE = True is written on some reconciles and missing on others. With both settings true, the two lines swap order.
So the <name>-server Secret changes between reconciles. The operator logs The Data from Secret pulp-server has been modified! Reconciling ... and Reprovisioning pulpcore pods to get the new settings ..., and rolls the api, content and worker Deployments. The rollout triggers more reconciles, each with roughly a 50% chance of flipping the Secret again, so the loop sustains itself. We saw it run for minutes after a single CR change, and once it ran for days, creating tens of thousands of ReplicaSets.
There is a second effect. Depending on the order, a true setting can be dropped from settings.py entirely, so REDIRECT_TO_OBJECT_STORAGE is sometimes not applied.
To Reproduce
- Set
redirect_to_object_storage: trueand leavehide_guarded_distributionsunset. - Change anything on the CR to trigger a reconcile.
- Watch the operator logs and
kubectl get rs.
Expected behavior
settings.py is identical on every reconcile, and each true setting is written.
Additional context
Fix: iterate over sorted keys, and continue instead of return on a false setting. PR to follow.
- Ngôn ngữ chính
- Go
- Star
- 88
- Fork
- 69
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pulp/pulp-operator
-
Documentation for metadata signing (APT/RPM) removed but still relevantCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởIssue Triage-Needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pulp/pulp-operator#1644 ·
-
Feature Triage-Needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pulp/pulp-operator#1697 · 2 reaction ·
-
Use /livez/ for the API liveness probe and a cheaper readiness probeCó thể đã có người làm @caiconkhicon đã nhận 26 ngày trước. Đang mởFeature Triage-Needed
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
pulp/pulp-operator#1696 · 1 bình luận ·
-
Issue Triage-Needed
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
pulp/pulp-operator#1685 ·
-
Gateway API compatibilityĐang mởFeature Triage-Needed
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
pulp/pulp-operator#1682 ·
Tất cả issue của pulp/pulp-operator
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
valkey-io/valkey-operator#610 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
WriterSetTimes: the UTIME_NOW check fails when the kernel uses its coarse clockCó thể đã có người làm @JakeChampion đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JakeChampion/lang#14224 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(reference): pi stream-filter bullet says tool_execution_update passes through unchangedĐang mởagent-butler-finding bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
jordansmall/spindrift#6391 ·
Maintainer thường phản hồi trong vòng 1 ngày