Skip to content
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

[v16] kube: properly return the reason for connection disruption #51455

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Jan 24, 2025

Backport #51398 to branch/v16

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/v16 with commit 65feb3f Jan 24, 2025
39 checks passed
@tigrato tigrato deleted the tigrato/fix-kube-incorrect-messages-v16 branch January 24, 2025 15:00
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