Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1317778 - oc rsh does not set TERM
oc rsh does not set TERM
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.1.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jonh Wendell
Xingxing Xia
https://github.com/openshift/origin/i...
:
: 1345731 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-15 04:17 EDT by Evgheni Dereveanchin
Modified: 2016-09-27 05:36 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:36:20 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
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:17:53 EDT
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:
Always

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 15:32:21 EDT
*** Bug 1345731 has been marked as a duplicate of this bug. ***
Comment 2 Andy Goldstein 2016-07-01 16:08:43 EDT
https://github.com/kubernetes/kubernetes/pull/28289
Comment 3 Jonh Wendell 2016-08-01 08:08:55 EDT
The issue has been fixed in origin
Comment 4 Xingxing Xia 2016-08-02 05:18:49 EDT
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
xterm-256color
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                                                                 
dumb
bash-4.2$ top
TERM environment variable not set.
Comment 5 Andy Goldstein 2016-08-02 06:16:17 EDT
We won't be changing `oc exec` for this
Comment 8 errata-xmlrpc 2016-09-27 05:36:20 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.