-
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
Improve readiness polling on node startup #11878
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11878 +/- ##
==========================================
+ Coverage 39.64% 45.05% +5.41%
==========================================
Files 189 188 -1
Lines 19091 19068 -23
==========================================
+ Hits 7568 8592 +1024
+ Misses 10305 9230 -1075
- Partials 1218 1246 +28
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:
|
792ebc8
to
40c53cb
Compare
39e7baf
to
89fca8c
Compare
89fca8c
to
1210f94
Compare
I want to do a bit more here, moving to draft. |
0b5f039
to
538b42d
Compare
538b42d
to
bd0f228
Compare
) | ||
|
||
const maxMsgSize = 1024 * 1024 * 16 | ||
|
||
// Connection connects to a CRI socket at the given path. | ||
func Connection(ctx context.Context, address string) (*grpc.ClientConn, error) { |
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.
this function was the exact same for both windows and linux, except for the socketPrefix and an alias on the util package import.
bd0f228
to
b77457b
Compare
b77457b
to
3901464
Compare
980e2fb
to
e8d4ed3
Compare
e8d4ed3
to
8c45359
Compare
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>
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>
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>
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>
8c45359
to
3571f24
Compare
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