[release-0.17] MultiKueue: one slow remote no longer stalls every other cluster#11333
Merged
k8s-ci-robot merged 3 commits intoMay 19, 2026
Conversation
The single controller wide write lock in setRemoteClientConfig used to be held across the synchronous remote watch establishment in setConfig, which can take minutes against an unresponsive or warming apiserver. While that lock is held, every other MultiKueueCluster reconcile that calls setRemoteClientConfig blocks, so one slow remote stalls admission for every other cluster regardless of GroupKindConcurrency. Narrow the controller wide lock to just the remoteClients map find or insert, then serialize setConfig with a per cluster sync.Mutex on remoteClient. Concurrent reconciles for different clusters now run in parallel under their own locks. Same cluster reconciles still serialize through the workqueue dedup contract; the per cluster lock is belt and suspenders. Adds TestSetRemoteClientConfigDoesNotBlockOtherClusters which pins the property: while one cluster is parked inside its remote Watch call, another cluster's setRemoteClientConfig still completes. Refs 11297.
Per @mimowo's review, factor the map find or insert out of setRemoteClientConfig so each function uses the simple Lock(); defer Unlock() pattern instead of a manual unlock in the middle.
Per @mimowo's review on the test: - use Reconcile as the entry point instead of calling setRemoteClientConfig directly, so the test stays valid if watches ever get triggered from a different path - replace the magic 2s timeouts with a named stuckWatchTimeout = 5s so they survive a loaded CI runner
Contributor
|
/lgtm |
Contributor
|
LGTM label has been added. DetailsGit tree hash: ff7d3ef76938ff7659f8880b645922c2bf040912 |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k8s-infra-cherrypick-robot, mimowo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
/kind bug |
✅ Deploy Preview for kubernetes-sigs-kueue ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
This is an automated cherry-pick of #11305
/assign mimowo