Bug 1248463
Summary: | wrong exec command help | ||
---|---|---|---|
Product: | OKD | Reporter: | Aleksandar Kostadinov <akostadi> |
Component: | oc | Assignee: | Fabiano Franz <ffranz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Yan Du <yadu> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.x | CC: | ffranz, jokerman, libra-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:11:12 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
Aleksandar Kostadinov
2015-07-30 11:04:32 UTC
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/a8939d6a819cfd8680764c71e1e5185f02eded09 Bug 1248463 - fixes exec help > # oc version
> oc v1.1-761-g052c08b
> kubernetes v1.1.0-origin-1107-g4c8e6f4
>
>
> # oc help exec
> Execute a command in a container
>
> Usage:
> oc exec POD [-c CONTAINER] [options] -- COMMAND [args...] [options]
>
> Examples:
> # Get output from running 'date' in ruby-container from pod 123456-7890
> $ oc exec -p 123456-7890 -c ruby-container date
>
> # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 and sends stdout/stderr from 'bash' back to the client
> $ oc exec -p 123456-7890 -c ruby-container -i -t -- bash -il
>
> Options:
> -c, --container='': Container name. If omitted, the first container in the pod will be chosen
> -p, --pod='': Pod name
> -i, --stdin=false: Pass stdin to the container
> -t, --tty=false: Stdin is a TTY
>
> Use "oc options" for a list of global command-line options (applies to all commands).
You can see above that `[options]` is still listed after `--`. `oc` cannot accept options as described in help after `--`. This can confuse users non-savvy in linux shell.
Fixed the usage in https://github.com/openshift/origin/pull/7895. Test on latest env, issue have been fixed # oc version oc v3.2.0.5 kubernetes v1.2.0-36-g4a3f9c5 # oc help exec Execute a command in a container Usage: oc exec [options] POD [-c CONTAINER] -- COMMAND [args...] Examples: # Get output from running 'date' in ruby-container from pod 123456-7890 $ oc exec -p 123456-7890 -c ruby-container date # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 and sends stdout/stderr from 'bash' back to the client $ oc exec -p 123456-7890 -c ruby-container -i -t -- bash -il Options: -c, --container='': Container name. If omitted, the first container in the pod will be chosen -p, --pod='': Pod name -i, --stdin=false: Pass stdin to the container -t, --tty=false: Stdin is a TTY Use "oc options" for a list of global command-line options (applies to all commands). |