Bug 1478280

Summary: [trello zoxUAO2w] Could delete command prompt when delete Chinese characters in terminal
Product: OKD Reporter: shahan <hasha>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED WORKSFORME QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas, xxia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-01 17:55:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
webm none

Description shahan 2017-08-04 07:58:30 UTC
Description of problem:
  When user wrongly input Chinese characters in terminal and try delete them, however, could delete command prompt unexpectedly.

version-Release number of selected component (if applicable):
OpenShift Master:v3.6.0-rc.0+8ec3b6f-470
Kubernetes Master:v1.7.0+695f48a16f 

How reproducible:
 Always

Steps to Reproduce:
1.Login in web console, and create pod
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/pods/pod_with_two_containers.json

2.Enter pod page and switch to terminal tab
3. Input some Chinese characters into terminal, and try delete

Actual results:
Will also delete Chinese characters. see attachment 

Expected results:
Should only delete these Chinese characters

Additional info:
target release: 3.7.0

Comment 1 shahan 2017-08-04 07:59:39 UTC
Created attachment 1308934 [details]
webm

Comment 2 Samuel Padgett 2017-08-04 14:14:06 UTC
I can reproduce in the web console, but not in the xterm.js demo against current xterm.js master. So this is either a bug specific to the web console / kubernetes-container-terminal or fixed in xterm.js 2.9.0.

Comment 3 Samuel Padgett 2017-08-04 15:01:55 UTC
I'm able to reproduce this with `oc rsh` outside of the web console. This doesn't seem to be specific to the web console terminal.

Comment 4 Samuel Padgett 2017-08-04 15:32:45 UTC
Also reproducible with Docker outside of OpenShift using this command

docker run -it --entrypoint=/bin/sh yapei/hello-openshift

Comment 5 Jhon Honce 2017-09-01 17:55:29 UTC
Using these rpms of docker, I cannot reproduce the issue.

docker-common-1.12.6-48.git0fdc778.el7.x86_64
docker-rhel-push-plugin-1.12.6-48.git0fdc778.el7.x86_64
docker-client-1.12.6-48.git0fdc778.el7.x86_64
docker-1.12.6-48.git0fdc778.el7.x86_64

$ env |grep -i term
TERM=xterm-256color

$ docker run -it --entrypoint=/bin/sh yapei/hello-openshift
Unable to find image 'yapei/hello-openshift:latest' locally
Trying to pull repository registry.access.redhat.com/yapei/hello-openshift ... 
Trying to pull repository docker.io/yapei/hello-openshift ... 
latest: Pulling from docker.io/yapei/hello-openshift
a3ed95caeb02: Pull complete 
b7b24afce32f: Pull complete 
355b03195ea7: Pull complete 
Digest: sha256:877ce8ef32d6f00f47097b7266b8508cb37df570e4cc26bfc1a6371058789c50
sh-4.2# exit
exit

xterm beeped when I attempted to delete into the prompt.