This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Time limit for cache sync on startup and controller reconciliations #102
Merged
timebertt
merged 2 commits into
gardener-attic:master
from
rfranzke:enh/reconcile-timeout
Jan 8, 2021
Merged
Time limit for cache sync on startup and controller reconciliations #102
timebertt
merged 2 commits into
gardener-attic:master
from
rfranzke:enh/reconcile-timeout
Jan 8, 2021
Conversation
This file contains 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
/invite @timebertt |
995027d
to
e52ec7c
Compare
|
/squash |
timebertt
previously approved these changes
Jan 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thank you!
This was exactly how I imagined it 🚀
/lgtm
@@ -113,7 +114,10 @@ func NewResourceManagerCommand() *cobra.Command { | |||
} | |||
}() | |||
|
|||
if !targetClientOpts.Completed().WaitForCacheSync(ctx.Done()) { | |||
ctxWaitForCache, cancelWaitForCache := context.WithTimeout(ctx, 5*time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side-note, doesn't have to be tackled in this PR: we should further improve health checks, by separating liveness and readiness endpoint and report an unready state as long as the caches haven't synced initially.
Though, this is also a general problem in our components.
ae4a026
to
eb09e7a
Compare
Due to the |
timebertt
approved these changes
Jan 8, 2021
16 tasks
12 tasks
76 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area/scalability
Scalability related
kind/bug
Bug
merge/squash
Should be merged via 'Squash and merge'
needs/ok-to-test
Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
reviewed/lgtm
Has approval for merging
size/m
Size of pull request is medium (see gardener-robot robot/bots/size.py)
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.
How to categorize this PR?
/area scalability
/kind bug
/priority normal
What this PR does / why we need it:
In order to prevent stuck worker routines as described in #99, @timebertt suggested to introduce time limits for the reconciliations of the controllers, similarly to how it's already done in Gardener's shoot care controller (see).
Also, the cache sync on startup is now limited to
5m
.Which issue(s) this PR fixes:
Fixes #99
Release note: