Bug 1377183

Summary: It's better to insert newline after prompt of oc rsh/exec for multiple-containers pod and oc rsh misses 'oc' word
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED EOL QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, jokerman, mmccomas
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: 2019-08-21 08:44:33 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:
Attachments:
Description Flags
oc rsh prompt not stable none

Description Xingxing Xia 2016-09-19 06:22:17 UTC
Description of problem:
It's better to insert newline after prompt of oc rsh/exec for multiple-containers pod and oc rsh misses 'oc' word

Version-Release number of selected component (if applicable):
oc v3.3.0.31

How reproducible:
Always

Steps to Reproduce:
1. Create pod with multiple containers
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/dc-with-two-containers.yaml
2. After pod containers are ready, test oc exec/rsh
1> $ oc exec dctest-1-k25mn ls /etc/hosts
defaulting container name to dctest-1, use 'oc describe po/dctest-1-k25mn' cmd to see all containers in this pod/etc/hosts
2> $ oc rsh dctest-1-k25mn ls /etc/hosts
defaulting container name to dctest-1, use ' describe po/dctest-1-k25mn' cmd to see all containers in this pod/etc/hosts
3. Test oc rsh without CMD
1> After the prompt "defaulting container name", press "Enter" immediately
$ oc rsh dctest-1-k25mn
2> Don't press "Enter" immediately, just wait
$ oc rsh dctest-1-k25mn

Actual results:
2.
Both 1> and 2>, between the prompt "... in this pod" and "/etc/hosts", no newline.
In 2>, there is no 'oc' word before 'describe'
3.
1> It will look like this:
$ oc rsh dctest-1-k25mn
defaulting container name to dctest-1, use ' describe po/dctest-1-k25mn' cmd to see all containers in this podsh-4.2$ 
sh-4.2$
2> The result is not stable.
Sometimes, the prompt will disappear too quickly to read, like
$ oc rsh dctest-1-k25mn
defaulting container name to dctest-1, use ' describe po/dctest-1-k25mn' cmd to see all containers in this pod  <-- will disappear too quickly
sh-4.2$
But sometimes, the prompt does not disappear, the response would look like:
defaulting container name to dctest-1, use ' describe po/dctest-1-n2p2f' cmd to see all containers in this podsh-4.2$


Expected results:
2. It's better to insert newline after prompt. Should have 'oc' from oc rsh.
3.
2>The prompt should not disappear so user can read it. If it does not disappear, should also insert newline between "... in this pod" and "sh-4.2"

Additional info:
Tried oc v3.3.0.5, no above problem.

Comment 1 Xingxing Xia 2016-09-19 07:08:50 UTC
Created attachment 1202322 [details]
oc rsh prompt not stable

Comment 2 Maciej Szulik 2019-08-21 08:44:33 UTC
Closing due to age.