-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Release-1.32] Improve readiness polling on node startup #12038
Merged
brandond
merged 6 commits into
k3s-io:release-1.32
from
brandond:improve-waits_release-1.32
Apr 1, 2025
Merged
[Release-1.32] Improve readiness polling on node startup #12038
brandond
merged 6 commits into
k3s-io:release-1.32
from
brandond:improve-waits_release-1.32
Apr 1, 2025
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
Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit c11c06c) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Increases log verbosity but decreases polling frequency to avoid spamming the console. It usually takes a couple seconds for the apiserver to come up anyway. Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit 2c13369) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Splits server startup into prepare/start phases. Server's agent is now started after server is prepared, but before it is started. This allows us to properly bootstrap the executor before starting server components, and use the executor to provide a shared channel to wait on apiserver readiness. This allows us to replace four separate callers of WaitForAPIServerReady with reads from a common ready channel. Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit 529e748) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Move the container runtime ready channel into the executor interface, instead of passing it awkwardly between server and agent config structs Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit a8bc412) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit 72bbd67) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This eliminates the final channel that was being passed around in an internal struct. The ETCD management code passes in a func that can be polled until etcd is ready; the executor is responsible for polling this after etcd is started and closing the etcd ready channel at the correct time. Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit d45006b) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
dereknola
approved these changes
Mar 31, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.32 #12038 +/- ##
================================================
+ Coverage 44.93% 45.03% +0.09%
================================================
Files 190 188 -2
Lines 19102 19065 -37
================================================
+ Hits 8583 8585 +2
+ Misses 9278 9234 -44
- Partials 1241 1246 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Proposed Changes
This PR eliminates the scattered creation of ready channels that are passed around via struct fields. Ready channels for all components started by the Executor are now exposed by the Executor, providing a consistent interface that different portions of the codebase can use to wait for components to be available.
Makes the error message nice when agents are retrying retrieval of cacerts from cluster
We were never actually logging anything here, as we would always take the
result.Error()
path whenever the apiserver isn't ready - and log nothing.Splits server startup into prepare/start phases. Server's agent is now started after server is prepared, but before the datastore and control-plane components are started. This allows us to properly bootstrap the executor before starting server components, and use the executor to provide a shared channel to wait on apiserver readiness.
This allows us to replace four separate callers of WaitForAPIServerReady with reads from a common ready channel.
Move the container runtime ready channel into the executor interface, instead of passing it awkwardly between server and agent config structs. This is for parity with the apiserver ready channel, and also adds validation that user-provided CRI services are up, something that was previously only done for containerd and cri-dockerd.
This eliminates the final channel that was being passed around in an internal struct. The ETCD management code passes in a func that can be polled until etcd is ready; the executor is responsible for polling this after etcd is started and closing the etcd ready channel at the correct time.
Types of Changes
tech debt
bugfix
Verification
Check logs
Testing
RKE2 validation:
Linked Issues
User-Facing Change
Further Comments