Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1415461 - Error message displays escape and even escape for escape when execute in container
Summary: Error message displays escape and even escape for escape when execute in cont...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Derek Carr
QA Contact: Xiaoli Tian
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-22 08:41 UTC by XiaochuanWang
Modified: 2019-06-26 15:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-26 15:17:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description XiaochuanWang 2017-01-22 08:41:04 UTC
Description of problem:
When user input invalid command to exec pod container, error message displays escape for invalid command when execute container and even quote for quote.

Version-Release number of selected component (if applicable):
oc v3.5.0.7+390ef18 

How reproducible:
Always

Steps to Reproduce:
1. oc run dc --image=aosqe/hello-openshift
2. Wait when pod is successfully running
3. oc rsh pod/dc-1-t4lrb --no-tty ls

Actual results:
3. rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"--no-tty\\\": executable file not found in $PATH\"\n"


Expected results:
3. # oc rsh pod/dc-1-hu59r --no-tty ls 
env: can't execute '--no-tty': No such file or directory

Additional info:

Comment 1 Derek Carr 2017-01-31 22:31:00 UTC
Is this a regression?

Comment 2 Derek Carr 2017-02-01 20:43:31 UTC
I was initially confused.

The proper way to run the command would have been:
$ oc rsh --no-tty pod/dc-1-q9s58 ls
bin
dev
etc
hello-openshift
home
proc
root
run
sys
tmp
usr
var

This is reproducible when running $ kubectl exec as follows:
$ cluster/kubectl.sh exec test-719311007-86x2g foobar
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"foobar\\\": executable file not found in $PATH\"\n"

I am lowering severity, but am opening an upstream issue to see what we can do to fix exec to give a better error.

see: https://github.com/kubernetes/kubernetes/issues/40820

Comment 3 XiaochuanWang 2017-03-21 02:14:17 UTC
It's not a regression, the output content is different.
Tested on v3.4.1.10
# oc rsh pod/dc-1-uyypj --no-tty ls
env: can't execute '--no-tty': No such file or directory

Comment 5 Greg Blomquist 2019-06-26 15:17:24 UTC
Closing wontfix.  This has no traction upstream, and no customer ticket associated and is low severity.  If it becomes an issue in the future, please re-open.


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