Skip to content

Restart sync controllers that stop unexpectedly - #201

Open
tolgayakar wants to merge 1 commit into
kcp-dev:mainfrom
tolgayakar:fix/sync-controller-startup-retry
Open

tolgayakar wants to merge 1 commit into
kcp-dev:mainfrom
tolgayakar:fix/sync-controller-startup-retry

Conversation

@tolgayakar

@tolgayakar tolgayakar commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

A sync controller that fails after StartController returns (e.g. a cache sync timeout) was removed from the DMCM but stayed registered in the sync manager, so later reconciles skipped it and sync never resumed without restarting the agent.

Sync controllers are now wrapped so that an unexpected exit triggers a reconcile of the PublishedResource. The sync manager drops the stopped entry and recreates the controller with exponential backoff (5s up to 5m), for the same UID and resourceVersion. Intentional shutdowns (cleanup, agent stop) don't trigger a retry.

This also covers the asynchronous failure path raised in the review of #191.

What Type of PR Is This?

/kind bug

Related Issue(s)

Fixes #190

Release Notes

Sync controllers that fail to start (e.g. due to a cache sync timeout) are now restarted automatically with exponential backoff.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/bug Categorizes issue or PR as related to a bug. labels Nov 18, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xrstf 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

@kcp-ci-bot kcp-ci-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 18, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

Hi @tolgayakar. Thanks for your PR.

I'm waiting for a kcp-dev 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.

@kcp-ci-bot kcp-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 18, 2026
@tolgayakar
tolgayakar force-pushed the fix/sync-controller-startup-retry branch from f9ee737 to 697f5e0 Compare November 18, 2026 10:14
Signed-off-by: tolgayakar <tolga-yakar@hotmail.com>

This branch has not been deployed

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: failed sync controller prevents subsequent startup retries

2 participants