Description of problem: When oc rsh pod, user may easily type wrong command, or, right command which fails. If user exist then, there is message "error: error executing remote command: error executing command in container: Error executing in Docker Container". Better to remove it because it seems not needed Version-Release number of selected component (if applicable): oc v1.3.0-alpha.2-1021-g11997a9 How reproducible: Always Steps to Reproduce: 1. oc new-app -f origin/examples/sample-app/application-template-stibuild.json 2. $ oc rsh database-1-pviz8 sh-4.2$ datr sh: datr: command not found sh-4.2$ exit exit error: error executing remote command: error executing command in container: Error executing in Docker Container: 127 3. $ oc rsh database-1-pviz8 sh-4.2$ /bin/false sh-4.2$ exit exit error: error executing remote command: error executing command in container: Error executing in Docker Container: 1 Actual results: 2 and 3: There outputs the error message Expected results: Better to let it exit silently, no need to output the error message. Additional info:
Open PR: https://github.com/openshift/origin/pull/9724
PR: https://github.com/openshift/origin/pull/9334
(In reply to Juan Vallejo from comment #2) > PR: https://github.com/openshift/origin/pull/9334 Please ignore PR link, this is for another bug
This has been fixed upstream and will be in Origin in the next rebase: https://github.com/kubernetes/kubernetes/pull/26541 We are not removing the error "error executing remote command..." as it could impact scriptability.
(In reply to Juan Vallejo from comment #4) > This has been fixed upstream and will be in Origin in the next rebase: > https://github.com/kubernetes/kubernetes/pull/26541 > > We are not removing the error "error executing remote command..." as it > could impact scriptability. The PR link does fix returning the right exit code for the command that failed in the container.
Tested on latest AMI devenv-centos7_5359 (openshift v1.4.0-alpha.1+9c4f9ee-179), the binary has included the rebase of PR 26541. Test steps: [centos@ip-172-18-3-144 xxia]$ oc rsh database-1-2zynr sh-4.2$ datr sh: datr: command not found sh-4.2$ exit exit [centos@ip-172-18-3-144 xxia]$ echo $? 127 [centos@ip-172-18-3-144 xxia]$ oc rsh database-1-2zynr sh-4.2$ ls inexist-file ls: cannot access inexist-file: No such file or directory sh-4.2$ exit exit [centos@ip-172-18-3-144 xxia]$ echo $? 2 Now it returns the right exit code for the command that failed in the container, like bug 1290023 of oc exec. > We are not removing the error "error executing remote command..." as it > could impact scriptability. But this is not the fact. From above results, seems the error "error executing remote command..." is removed?
> But this is not the fact. From above results, seems the error "error executing remote command..." is removed? Apologies, I had used an older openshift image for my results. Tried it again with `openshift v1.3.0-rc1+9c4f9ee-1415` and it is not giving me the message "error executing remote command..." anymore.