-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Backport release-1.30] Applier manager improvements #5172
Merged
twz123
merged 6 commits into
k0sproject:release-1.30
from
twz123:backport-5171-to-release-1.30
Nov 29, 2024
Merged
[Backport release-1.30] Applier manager improvements #5172
twz123
merged 6 commits into
k0sproject:release-1.30
from
twz123:backport-5171-to-release-1.30
Nov 29, 2024
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
The map is only ever used in the loop to create and remove stacks, so it doesn't need to be stored in the struct. This ensures that there can't be any racy concurrent accesses to it. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit ba547ed) (cherry picked from commit c6dba06)
The only reason these channels get closed is if the watcher itself gets closed. This happens only when the method returns, which in turn only happens when the context is done. In this case, the loop has already exited without a select on a potentially closed channel. So the branches that checked for closed channels were effectively unreachable during runtime. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit db5e0d2) (cherry picked from commit 102b7e3)
Rename cancelWatcher to stop and wait until the newly added stopped channel is closed. Also, add a stopped channel to each stack to do the same for each stack-specific goroutine. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit 402c728) (cherry picked from commit dbc286c)
Cancel the contexts with a cause. Add this cause to the log statements when exiting loops. Rename bundlePath to bundleDir to reflect the fact that it is a directory, not a file. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit edb105c) (cherry picked from commit a22902b)
Exit the loop on error and restart it after a one-minute delay to allow it to recover in a new run. Also replace the bespoke retry loop for stacks with the Kubernetes client's wait package. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit 404c6cf) (cherry picked from commit 3058460)
Seems to be a remnant from the past. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit c2beea7) (cherry picked from commit 4b2efbe)
twz123
added
area/controlplane
chore
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
labels
Oct 30, 2024
ncopa
approved these changes
Nov 29, 2024
Successfully created backport PR for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/controlplane
backport/release-1.29
PR that needs to be backported/cherrypicked to the release-1.29 branch
chore
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.
Backport to
release-1.30
:Partially, without the test case (3502970). See Applier manager improvements #5062 (comment).
See: