Skip to content

Fix TektonInstallerSet deadlock when resources have deletionTimestamp#3217

Open
jkhelil wants to merge 1 commit intotektoncd:mainfrom
jkhelil:fix_deadlock
Open

Fix TektonInstallerSet deadlock when resources have deletionTimestamp#3217
jkhelil wants to merge 1 commit intotektoncd:mainfrom
jkhelil:fix_deadlock

Conversation

@jkhelil
Copy link
Member

@jkhelil jkhelil commented Feb 14, 2026

Changes

  • Added installerSetName parameter to ensureResources() and all callers
  • Checks OwnerReferences to determine if resource belongs to this InstallerSet
  • Only waits for owned resources, skips others
  • Allows reconciliation to continue even with TERMINATING CRDs

Fixes #2474

The operator enters a deadlock when any resource (e.g., CRD) has a deletionTimestamp during InstallerSet reconciliation. The current code immediately aborts the entire reconciliation phase, preventing critical namespace-scoped resources (ServiceAccounts, RBAC) from being created.

Symptoms:

  • No ServiceAccounts created in openshift-pipelines namespace
  • InstallerSets stuck with "reconcile again and proceed"
  • No component pods running (Deployments fail: serviceaccount not found)
  • Webhooks unavailable → TektonConfig can't reconcile
  • Operator logs show infinite CRD fetching loop

Impact: Complete operator failure during installations, upgrades, downgrades, or recovery operations.

Root Cause

Location: pkg/reconciler/kubernetes/tektoninstallerset/install.go:166-168

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Feb 14, 2026
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from jkhelil after the PR has been reviewed.

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

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesnt merit a release note. 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.

Detect *stale* tekton objects prior to a upgrade / reconciliaton

2 participants