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:
Is this a regression?
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
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
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.