Description of problem: Though https://bugzilla.redhat.com/show_bug.cgi?id=1317778 is fixed, web console still does not set TERM, causing less, top not work well. Version-Release number of selected component (if applicable): openshift v3.3.0.19 How reproducible: Always Steps to Reproduce: 1. On web console, click Applications --> Pods --> frontend-2-wu20y --> Terminal 2. After entering web terminal's shell, run: sh-4.2$ top TERM environment variable not set sh-4.2$ less /etc/hosts WARNING: terminal is not full functional /etc/hosts (press RETURN) If we press Enter, `less` can show the content of /etc/hosts, though 3. Set TERM manually, run top and less again sh-4.2$ export TERM=xterm sh-4.2$ top sh-4.2$ less /etc/hosts Actual results: 2. As stated in step inline. 3. top and less work well Expected results: 2. It is better to automatically set TERM in web terminal like under CLI terminal. CLI terminal results are: [tester@pc_vm3 oc]$ oc rsh frontend-2-wu20y sh-4.2$ less /etc/hosts # Kubernetes-managed hosts file. 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback <snipped> sh-4.2$ top top - 08:37:49 up 1 day, 5:45, 0 users, load average: 0.18, 0.24, 0.37 Tasks: 7 total, 1 running, 6 sleeping, 0 stopped, 0 zombie <snipped> Additional info:
The CLI attempts to use whatever your TERM env is set to and then falls back to xterm, see https://github.com/kubernetes/kubernetes/pull/28289/files We don't know what your TERM env is, so the best we could do is always assume xterm.
merging to origin in https://github.com/openshift/origin/pull/10470
This has been merged into ose and is in OSE v3.3.0.22 or newer.
Tested against openshift v3.3.0.22, now in web console terminal, TERM is automatically set to "xterm", `top` and `less` work well like under CLI
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