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

k8s: Bring back TTY to Exec #1299

Merged
merged 1 commit into from
Dec 14, 2022
Merged

k8s: Bring back TTY to Exec #1299

merged 1 commit into from
Dec 14, 2022

Conversation

brb
Copy link
Member

@brb brb commented Dec 14, 2022

This is a partial revert of commit 30310b1 ("connectivity, k8s, internal/utils: drop ExecInPodWithTTY and CtrlCReader").

Unfortunately, using the same context as StreamWithContext() to indicate a cancellation of a program running via Exec doesn't work as expected. From quick experimentation, it only closes a connection which doesn't necessarily send SIGTERM to a remote program. As a result, the tcpdump kept dangling in the encryption tests.

Bring back the ctrlreader, and use a separate context for it.

Signed-off-by: Martynas Pumputis [email protected]

@brb brb added the area/CI Continuous Integration testing issue or flake label Dec 14, 2022
@brb brb requested a review from tklauser December 14, 2022 09:16
@brb brb requested review from a team as code owners December 14, 2022 09:16
@brb brb requested a review from squeed December 14, 2022 09:16
@brb brb temporarily deployed to ci December 14, 2022 09:16 — with GitHub Actions Inactive
@brb
Copy link
Member Author

brb commented Dec 14, 2022

Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM.

k8s/client.go Outdated Show resolved Hide resolved
This is a partial revert of commit 30310b1 ("connectivity, k8s,
internal/utils: drop ExecInPodWithTTY and CtrlCReader").

Unfortunately, using the same context as StreamWithContext() to indicate
a cancellation of a program running via Exec doesn't work as expected.
From quick experimentation, it only closes a connection which doesn't
necessarily send SIGTERM to a remote program. As a result, the tcpdump
kept dangling in the encryption tests.

Bring back the ctrlreader, and use a separate context for it.

Signed-off-by: Martynas Pumputis <[email protected]>
@brb brb force-pushed the pr/brb/fix-exec-in-pod-kill branch from 6811b2f to dc85fbc Compare December 14, 2022 14:37
@brb brb temporarily deployed to ci December 14, 2022 14:37 — with GitHub Actions Inactive
@tklauser tklauser merged commit a16c44d into master Dec 14, 2022
@tklauser tklauser deleted the pr/brb/fix-exec-in-pod-kill branch December 14, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants