[v15] Prevent leaking gRPC clients when connecting to the cluster fails#38005
Merged
rosstimothy merged 1 commit intobranch/v15from Feb 9, 2024
Merged
[v15] Prevent leaking gRPC clients when connecting to the cluster fails#38005rosstimothy merged 1 commit intobranch/v15from
rosstimothy merged 1 commit intobranch/v15from
Conversation
There are a few scenarios during agent registration that may result in an auth client being created but never closed. One particular scenario that can hit this path is a v12 agent trying to join a >=v14 control plane. The first thing agents do after validating that the client was created succesfully is retrieve the Host CA for the cluster. If that fails then the error is returned but the client is never closed and the agent will try connecting again in the future. This behavior is particularly troublesome because in v12 the API responsible for that was the auth HTTP API, in V13 it was deprecated in favor of a gRPC API and in v14 the HTTP API was removed entirely. So any v12 agents trying to connect to a >=v14 control plane will continuously fail getting the Host CA because the HTTP request they issue will result in a 404.
espadolini
approved these changes
Feb 9, 2024
tigrato
approved these changes
Feb 9, 2024
Merged
This was referenced Feb 24, 2024
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.
Backport #37944 to branch/v15
changelog: Force agents to terminate Auth connections if joining fails