-
Notifications
You must be signed in to change notification settings - Fork 1.1k
OCPBUGS-4556: internal/oci: fix terminal resize race condition #9246
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
OCPBUGS-4556: internal/oci: fix terminal resize race condition #9246
Conversation
|
@sohankunkerkar: This pull request references Jira Issue OCPBUGS-4556, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9246 +/- ##
==========================================
+ Coverage 65.87% 66.97% +1.09%
==========================================
Files 198 198
Lines 27171 27193 +22
==========================================
+ Hits 17900 18212 +312
+ Misses 7781 7483 -298
- Partials 1490 1498 +8 🚀 New features to boost your workflow:
|
|
/jira refresh |
|
@sohankunkerkar: This pull request references Jira Issue OCPBUGS-4556, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: zhouying7780. Note that only cri-o members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
73f867d to
d6f437d
Compare
|
/retest |
7042630 to
135f9fc
Compare
|
@cri-o/cri-o-maintainers PTAL |
135f9fc to
8f7a435
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
You can use golang.org/x/term functions IsTerminal and GetSize to make the code simpler.
-
I don't think querying stdin/stdout/stderr of the current process for terminal size is a good idea, since the current process is a cri-o daemon which is not running on the same terminal as whoever is trying to do exec.
Probably the correct solution belongs elsewhere -- whoever is calling Attach should send a resize event.
Thanks @kolyshkin |
755c480 to
6b520f3
Compare
|
@sohankunkerkar: This pull request references Jira Issue OCPBUGS-4556, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: zhouying7780. Note that only cri-o members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
6b520f3 to
e7104d9
Compare
This fixes the issue where container terminals were getting stuck at incorrect sizes due to rapid successive resize events not being handled properly. When 'oc debug' or 'kubectl exec' sends the typical resize sequence (inflate +1, then restore to original), the second event was being processed but not applied correctly, leaving the terminal at the wrong size. Signed-off-by: Sohan Kunkerkar <[email protected]>
e7104d9 to
0d449e0
Compare
|
@sohankunkerkar: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new logic is totally different, it would make sense to close this PR and open a new one.
Anyway, the changes LGTM.
Have you confirmed this fixes the issue?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kolyshkin, sohankunkerkar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@sohankunkerkar: Jira Issue OCPBUGS-4556: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-4556 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Yeah, the current fix worked for me locally. |
This reverts cri-o#9246 The actual fix should be conmon and not in CRI-O. Signed-off-by: Sohan Kunkerkar <[email protected]>
This reverts cri-o#9246 The actual fix should be conmon and not in CRI-O. Signed-off-by: Sohan Kunkerkar <[email protected]>
This fixes the issue where container terminals were getting stuck at incorrect sizes due to rapid successive resize events not being handled properly. When 'oc debug' or 'kubectl exec' sends the typical resize sequence (inflate +1, then restore to original), the second event was being processed but not applied correctly, leaving the terminal at the wrong size.
Before this fix:
After the fix:
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?