Skip to content

fix: treat LRR-failed-but-LCR-different as transient in traffic config - #16702

Open
higgsboson1710 wants to merge 1 commit into
knative:mainfrom
higgsboson1710:fix-stuck-revision-16698
Open

higgsboson1710 wants to merge 1 commit into
knative:mainfrom
higgsboson1710:fix-stuck-revision-16698

Conversation

@higgsboson1710

Copy link
Copy Markdown

Fixes: #16698

When a Knative revision fails, the following state can occur in the Configuration:

  • LatestReadyRevisionName = "rev-v2" (the now-failed revision)
  • LatestCreatedRevisionName = "rev-v3" (a new revision being deployed)
  • Ready = Unknown (since LRR != LCR)

In this state, the Route controller's addConfigurationTarget would:

  1. Find LRR = "rev-v2" (non-empty, so NOT taking the errUnreadyConfiguration path)
  2. Fetch rev-v2 from lister → find it is NOT ready (failed)
  3. Call errUnreadyRevision(rev-v2) → isFailure = true (since rev.Ready = False)
  4. Call MarkRevisionFailed on Route → Route.AllTrafficAssigned = False (permanent)

This caused the Route to become permanently stuck even when a new revision
(rev-v3) is actively being deployed to replace the failed one. The Route would
not automatically recover — users had to manually delete the failed Revision
to force a re-reconciliation.

The fix: in addConfigurationTarget, before calling errUnreadyRevision when the
LRR revision is found to be failed, check if LCR != LRR. If they differ, a new
revision is in flight, so we should return errUnreadyConfiguration instead —
which produces isFailure=false and lets the Route retry gracefully.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: higgsboson1710 / name: Abhinav (aa28af5)

@knative-prow

knative-prow Bot commented Oct 10, 2026

Copy link
Copy Markdown

Welcome @higgsboson1710! It looks like this is your first PR to knative/serving 🎉

@knative-prow knative-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 10, 2026
@knative-prow

knative-prow Bot commented Oct 10, 2026

Copy link
Copy Markdown

Hi @higgsboson1710. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow

knative-prow Bot commented Oct 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: higgsboson1710
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Knative Deployment Remains Stuck After Failed Revision Until Revision Is Deleted

1 participant