Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1317784 - oc rsh does not set console geometry
oc rsh does not set console geometry
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.1.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Andy Goldstein
DeShuai Ma
: NeedsTestCase
Depends On:
Blocks: 1486196 1356062
  Show dependency treegraph
 
Reported: 2016-03-15 04:30 EDT by Evgheni Dereveanchin
Modified: 2018-03-26 10:37 EDT (History)
8 users (show)

See Also:
Fixed In Version: atomic-openshift-3.3.0.10-1.git.0.c419cc7.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:36:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2207591 None None None 2016-03-23 09:47 EDT
Origin (Github) 2284 None None None 2016-03-15 09:45 EDT
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description Evgheni Dereveanchin 2016-03-15 04:30:52 EDT
Description of problem:
 when running "oc rsh", geometry of the console is not passed to the container, so the shell works with default 80×25 geometry which causes scrollback issues in programs like "less"

Version-Release number of selected component (if applicable):
# oc version
oc v3.1.1.6-21-gcd70c35
kubernetes v1.1.0-origin-1107-g4c8e6f4

How reproducible:
always

Steps to Reproduce:
1. oc rsh <pod>
2. set TERM manually to enable scrollback (bz#1317778)
 export TERM=xterm
3. less /path/to/log

Actual results:
 file opens up, but when trying to scroll back the screen is corrupted as the actual terminal size is different from what the container thinks.

Expected results:
 scrollback works properly in less, other command-line tools also work correctly to make troubleshooting easier.

Additional info:

 Here's the geometry reported by "stty -a" in the container
  speed 38400 baud; rows 0; columns 0; line = 0;

 To work around this issue I did this:
  1) find out the geometry of the shell by running "stty -a" before "oc rsh"
  2) set the same geometry in the container 
    stty rows 62 columns 224
 
 this made less work properly, however it needs to be done each time and will not catch the changes in terminal window size.
Comment 2 Andy Goldstein 2016-07-13 15:48:23 EDT
https://github.com/kubernetes/kubernetes/pull/25273
Comment 3 Andy Goldstein 2016-07-15 10:49:34 EDT
The upstream PR merged. I've opened https://github.com/openshift/origin/pull/9878 to cherry-pick to Origin.
Comment 4 Andy Goldstein 2016-08-04 06:38:44 EDT
Fixed in 3.3.0.10
Comment 5 Weihua Meng 2016-08-05 02:45:30 EDT
Fixed. 
openshift v3.3.0.14
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

sh-4.2$ stty -a
speed 38400 baud; rows 42; columns 114; line = 0;
Comment 7 errata-xmlrpc 2016-09-27 05:36:25 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1933

Note You need to log in before you can comment on or make changes to this bug.