A failed release is retried without backoff

Aperta
#578 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
59
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di operator-framework/helm-operator-plugins

Tutte le issue di operator-framework/helm-operator-plugins

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.