settings.py flaps between reconciles: needsMigrationSetting depends on map iteration order
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
controllers/repo_manager/secret.goを読み、まずneedsMigrationSetting()と、それがMigrationSettingsList()をどのように使用するかを確認してください。変更を加える前に、関連するテストを確認してください。生成されたsettings.pyが調整のたびに安定しており、trueに設定されたすべての設定が書き込まれることをもって完了とします。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 88
- フォーク
- 69
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pulp/pulp-operator のほかの issue
-
Documentation for metadata signing (APT/RPM) removed but still relevant再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンIssue Triage-Needed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pulp/pulp-operator#1644 ·
-
Feature Triage-Needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
pulp/pulp-operator#1697 · リアクション 2 件 ·
-
Use /livez/ for the API liveness probe and a cheaper readiness probe対応中かも @caiconkhicon が 19 日前に担当しました。 オープンFeature Triage-Needed
難易度 3/5 半日 初心者へのやさしさ 62/100
pulp/pulp-operator#1696 · コメント 1 件 ·
-
Issue Triage-Needed
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
pulp/pulp-operator#1685 ·
-
Feature Triage-Needed
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
pulp/pulp-operator#1682 ·
pulp/pulp-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Energy flow: add an "Other" row so the consumers add up to the consumption total対応中かも @github-actions が今日担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
evcc-io/evcc#35512 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nebari-dev/nebi#630 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
router-for-me/CLIProxyAPI#7084 ·
メンテナーはふだん 1 日以内に返信