Skip to content

[v15] Prevent leaking gRPC clients when connecting to the cluster fails#38005

Merged
rosstimothy merged 1 commit intobranch/v15from
bot/backport-37944-branch/v15
Feb 9, 2024
Merged

[v15] Prevent leaking gRPC clients when connecting to the cluster fails#38005
rosstimothy merged 1 commit intobranch/v15from
bot/backport-37944-branch/v15

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #37944 to branch/v15

changelog: Force agents to terminate Auth connections if joining fails

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.
@rosstimothy rosstimothy marked this pull request as ready for review February 9, 2024 15:01
@rosstimothy rosstimothy added this pull request to the merge queue Feb 9, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 9, 2024
@rosstimothy rosstimothy added this pull request to the merge queue Feb 9, 2024
Merged via the queue into branch/v15 with commit 4f45336 Feb 9, 2024
@rosstimothy rosstimothy deleted the bot/backport-37944-branch/v15 branch February 9, 2024 16:20
@fheinecke fheinecke mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants