Repository navigation
Fix failed rollback after canceled health check - #1605
Open
ruslan-shaydullin wants to merge 1 commit into
Open
ruslan-shaydullin wants to merge 1 commit into
ruslan-shaydullin wants to merge 1 commit into
Conversation
With CancelHealthCheckOnNewRevision enabled, a new reconcile request cancels the health check of a running upgrade and the upgrade fails. If upgrade remediation is configured, the rollback starts in the same reconcile: it applies the previous manifests, waits on the already canceled context, fails as well and leaves a second failed revision behind. Requeue instead of starting the rollback when the object has been enqueued again. The next reconcile runs the rollback if nothing changed, or upgrades if the chart or values did. Signed-off-by: Ruslan Shaydullin <shaydullin.r.d@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #1557
With the
CancelHealthCheckOnNewRevisionfeature gate enabled and upgrade remediation configured, the rollback starts in the same reconciliation in which the health check was canceled, applies the previous release, waits on the already canceled interrupt context, fails withcontext canceledand leaves a second failed release in Helm storage. After a real timeout the rollback completes.I added a check before the rollback: if the object is enqueued again, the reconciler requeues instead, regardless of why it was enqueued or why the upgrade failed, as it already does with
IsObjectEnqueuedwhenAtomicReleasereturns an error. The canceled upgrade is still recorded as a failed release. The next reconciliation upgrades if the chart or values changed, otherwise it runs the same rollback on a fresh interrupt context. Resources only in the canceled release stay after that upgrade, where the failed rollback used to remove them; withRetryOnFailurethey stay on main too.