A failed release is retried without backoff

オープン
#578 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
backend

調査の方向性

Start by reading the reconciler's watches for custom resources and release Secrets, then trace how failed attempts update the Irreconcilable condition and write release Secrets. Reproduce with WithFailureRollbacks(false) and a chart containing a Service with port 70000; the issue is resolved when repeated failures use backoff instead of immediately requeuing the resource.

索引モデルが issue の本文から書いたものです。

説明

When an install or upgrade keeps failing, for example because the API server rejects one of the rendered resources, the reconciler retries it right away instead of with controller-runtime's backoff. In our case, it retries about every 1.5 seconds for as long as the chart fails, and logs an error and writes to the API server each time.

Two things requeue the custom resource after every failed attempt, and each of them alone keeps the loop going:

  1. The status update. Every failed attempt writes the status of the custom resource, and the reconciler watches the custom resource for any change, including a status change. The status changes even when the error stays the same, because the reconciler sets Irreconcilable to False before each attempt and back to True after it fails, which gives the condition a new lastTransitionTime.
  2. The release Secrets. The custom resource owns its release Secrets, and the reconciler watches them, so the Secret that Helm writes for each failed revision requeues the resource.

This is the problem of #224. Its fixes, #225 and #226, were closed as stale. It also happens with WithFailureRollbacks(false), without rollbacks.

A possible fix is to ignore updates of the custom resource that change only its status, as the reconciler already does for dependent resources, which also covers errors whose message changes between attempts, and to keep the release Secret writes from requeuing the resource.

Steps to reproduce

Reconcile a custom resource with WithFailureRollbacks(false) and a chart that renders a resource the API server rejects, for example a Service with port 70000.

主要言語
Go
スター
59
フォーク
54
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

operator-framework/helm-operator-plugins のほかの issue

operator-framework/helm-operator-plugins の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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