Bug 1263609
Summary: | oc rsh take command option as command argument wrongly | ||
---|---|---|---|
Product: | OKD | Reporter: | Yadan Pei <yapei> |
Component: | oc | Assignee: | Fabiano Franz <ffranz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Wei Sun <wsun> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.x | CC: | adietish, aos-bugs, mmccomas |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-12 17:16:02 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: | |
Embargoed: |
Description
Yadan Pei
2015-09-16 09:50:46 UTC
Fixed in https://github.com/openshift/origin/pull/6619. Note that we still have [options] in the end for the command options, but added [options] for the rsh command. Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/0741048c36a2fdc7fbd70dba72ccb960ca5bab78 Bug 1263609 - fix oc rsh usage checked on devenv-rhel7_3145, when -c option is carried, 'oc rsh doublecontainers --container=hello-openshift-fedora‘ There is still error info printed, exec: "--container=hello-openshift-fedora": executable file not found in $PATH error: error executing remote command: Error executing command in container: Error executing in Docker Container: -1 when other option (-T/-t) is carried, same problem happens Fixed the usage in https://github.com/openshift/origin/pull/7895. checked against devenv-rhel7_3688, 1. Check 'oc rsh' usage Usage: oc rsh POD [options] [COMMAND] 2. [options] are placed behind POD # oc rsh doublecontainers -c hello-openshift-fedora cat /etc/system-release exec: "-c": executable file not found in $PATH 3. [options] are placed before POD # oc rsh -c hello-openshift-fedora doublecontainers cat /etc/system-release Fedora release 21 (Twenty One) 4. Compared with 'oc exec' # oc exec doublecontainers -c hello-openshift-fedora cat /etc/system-release Fedora release 21 (Twenty One) From step2, when [options] comes after POD, it gives error info. I think this is wrong behaviour because help info says [options] comes after POD, current solution didn't match help info. Another issue, In the help info, it says "will attempt to use '/bin/bash' as the default shell", please see this command # oc rsh doublecontainers sh-4.2$ echo $BASH /bin/sh sh-4.2$ ps PID TTY TIME CMD 55 ? 00:00:00 sh 59 ? 00:00:00 ps it seems that /bin/sh is used instead of /bin/bash. Please check these problems Good catch, rsh usage is fixed in https://github.com/openshift/origin/pull/7946. checked against devenv-rhel7_3705 Now the command works well # oc rsh -c hello-openshift-fedora doublecontainers sh-4.3$ cat /etc/system-release Fedora release 21 (Twenty One) sh-4.3$ exit exit # oc rsh --container=hello-openshift-fedora doublecontainers sh-4.3$ cat /etc/system-release Fedora release 21 (Twenty One) sh-4.3$ exit exit # oc rsh --container=hello-openshift-fedora doublecontainers cat /etc/system-release Fedora release 21 (Twenty One) # oc rsh --container=hello-openshift-fedora --shell=/bin/bash doublecontainers bash-4.3$ exit Move to VERIFIED |