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

settings.py flaps between reconciles: needsMigrationSetting depends on map iteration order

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

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

2026年10月5日 から。

  • #1692 @fontaineajulien による — オープン

評価

難易度
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

  1. Set redirect_to_object_storage: true and leave hide_guarded_distributions unset.
  2. Change anything on the CR to trigger a reconcile.
  3. 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

環境構築

はじめの一歩

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

pulp/pulp-operator のほかの issue

pulp/pulp-operator の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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