Bug 1317778 - oc rsh does not set TERM
Summary: oc rsh does not set TERM
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jonh Wendell
QA Contact: Xingxing Xia
URL: https://github.com/openshift/origin/i...
: 1345731 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2016-03-15 08:17 UTC by Evgheni Dereveanchin
Modified: 2019-10-10 11:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-09-27 09:36:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC
Red Hat Knowledge Base (Solution) 2207591 None None None 2016-03-23 13:47:51 UTC

Description Evgheni Dereveanchin 2016-03-15 08:17:53 UTC
Description of problem:
 when running "oc rsh" the TERM environment variable is not set and the shell works in dumb terminal mode. This causes some applications like "less" to work incorrectly which complicates troubleshooting

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:

Steps to Reproduce:
1. oc rsh <pod>
2. less /path/to/log

Actual results:
 WARNING: terminal is not fully functional

 scrollback does not work

Expected results:
 less works as expected

Additional info:
 upstream issue https://github.com/openshift/origin/issues/7424

Comment 1 Ben Parees 2016-06-20 19:32:21 UTC
*** Bug 1345731 has been marked as a duplicate of this bug. ***

Comment 2 Andy Goldstein 2016-07-01 20:08:43 UTC

Comment 3 Jonh Wendell 2016-08-01 12:08:55 UTC
The issue has been fixed in origin

Comment 4 Xingxing Xia 2016-08-02 09:18:49 UTC
Checked in latest Origin 
$ oc/openshift version
openshift v1.3.0-alpha.2+b26dd1e
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

And in latest puddle:
$ oc/openshift version
openshift v3.3.0.13
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

Both in Origin and OCP, bug is fixed:
$ oc rsh database-1-i91xu
sh-4.2$ echo $TERM
sh-4.2$ top
sh-4.2$ more /etc/bashrc

Both `top` and `more` work well.

** But `oc exec` does not set TERM **
$ oc exec database-1-i91xu -it -- bash
bash-4.2$ echo $TERM                                                                 
bash-4.2$ top
TERM environment variable not set.

Comment 5 Andy Goldstein 2016-08-02 10:16:17 UTC
We won't be changing `oc exec` for this

Comment 8 errata-xmlrpc 2016-09-27 09:36:20 UTC
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.


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