Skip to content

[v17] kube: properly return the reason for connection disruption#51454

Merged
tigrato merged 2 commits intobranch/v17from
tigrato/fix-kube-incorrect-messages-v17
Jan 24, 2025
Merged

[v17] kube: properly return the reason for connection disruption#51454
tigrato merged 2 commits intobranch/v17from
tigrato/fix-kube-incorrect-messages-v17

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jan 24, 2025

Backport #51398 to branch/v17

Changelog: Improved handling of client session termination during Kubernetes Exec sessions. The disconnection reason is now accurately returned for cases such as certificate expiration, forced lock activation, or idle timeout.

* kube: properly return the reason for connection disruption

There are several cases where connection monitor can terminate an
ongoing connection. Iddle timeout, certificate expiring among others are
some reasons for the connection to be terminated.

For Kubernetes access, the underlying error is never propagated back to
the client so they don't receive the reason for the exec session being
terminated.

This PR fixes that by adding an hook to write the client error response
into the connection error channel for clients to be aware.

Part of #18496

* handle review comments

* handle review comments
@tigrato tigrato enabled auto-merge January 24, 2025 13:43
@tigrato tigrato added this pull request to the merge queue Jan 24, 2025
Merged via the queue into branch/v17 with commit a71e73e Jan 24, 2025
@tigrato tigrato deleted the tigrato/fix-kube-incorrect-messages-v17 branch January 24, 2025 14:21
@camscale camscale mentioned this pull request Feb 13, 2025
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