Bug 1377183 - It's better to insert newline after prompt of oc rsh/exec for multiple-containers pod and oc rsh misses 'oc' word
Summary: It's better to insert newline after prompt of oc rsh/exec for multiple-contai...
Keywords:
Status: CLOSED EOL
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-19 06:22 UTC by Xingxing Xia
Modified: 2019-08-21 08:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-21 08:44:33 UTC
Target Upstream Version:


Attachments (Terms of Use)
oc rsh prompt not stable (42.50 KB, image/gif)
2016-09-19 07:08 UTC, Xingxing Xia
no flags Details

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.


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