Bug 1169685 - [origin_devexp_390] osc describe/build-logs/namespace help info is not correct
Summary: [origin_devexp_390] osc describe/build-logs/namespace help info is not correct
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-02 08:26 UTC by XiuJuan Wang
Modified: 2015-05-15 03:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 19:55:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description XiuJuan Wang 2014-12-02 08:26:41 UTC
Description of problem:
No help docs for describe/log/build-logs/namespace of kubectl.And can't use '-h/--help' to show kubectl help,must use 'openshift kubectl' directly.

Version-Release number of selected component (if applicable):
devenv-fedora_434

How reproducible:
always

Steps to Reproduce:
1.Get kubectl help
$openshift kubectl -h/--help
2.Get kubectl subcommands help
openshift kubectl describe/log/build-logs/namespace -h/--help
3.Use 'openshift kubectl' directly

Actual results:
step 1&2:No help docs appear
$ openshift kubectl decribe -h
Usage of openshift:

Usage: 
  openshift [flags]
  openshift [command]

Available Commands: 
  start [master|node]       Launch OpenShift
  kube                      The Kubernetes command line client
  kubectl                   kubectl controls the Kubernetes cluster manager and OpenShift
  version                   Display version
  help [command]            Help about any command

 Available Flags:
  -h, --help=false: help for openshift
      --loglevel=0: Set the level of log output (0-5)

Use "openshift help [command]" for more information about that command.
Error: Usage of openshift:
      --loglevel=0: Set the level of log output (0-5)

step 3:
$ openshift kubectl
Controls the Kubernetes cluster manager.
Find more information at https://github.com/GoogleCloudPlatform/kubernetes and
https://github.com/openshift/origin.

Usage: 
  openshift kubectl [flags]
  openshift kubectl [command]

Available Commands: 
  proxy                                               Run a proxy to the Kubernetes API server
  get [(-o|--output=)json|yaml|...] <resource> [<id>] Display one or many resources
  describe <resource> <id>                            Show details of a specific resource
<----------------------skip------------------------------>
Expected results:


Additional info:

Comment 1 XiuJuan Wang 2014-12-11 08:44:24 UTC
Meantime,there are some typo in help docs.

1.Should no space in 'p rompt' for -a option.

-a, --auth-path="/home/fedora/.kubernetes_auth": Path to the auth info file. If missing, p rompt the user. Only used if using https.

2.Should switch 'apply' to 'createall' in createall help doc

Examples:
  $ kubectl createall -d configs/
  <creates all resources listed in JSON or YAML files, found recursively under the configs directory>

  $ kubectl createall -f config.json
  <creates all resources listed in config.json>

  $ cat config.json | kubectl apply -f -
  <creates all resources listed in config.json>

Comment 2 DeShuai Ma 2014-12-16 08:57:38 UTC
The commands below also have the same error:
$ openshift --help
$ openshift cli --help
$ openshift version --help
$ openshift help --help

Comment 3 Yan Du 2015-01-07 05:57:11 UTC
some osc commands' help info are still not detail enough, eg:osc describe, osc namespace, osc build-logs

[fedora@ip-10-169-236-217 hello-openshift]$ osc describe -h
Usage of osc:

Usage: 
  osc describe <resource> <id> [flags]

 Available Flags:
      --api-version="v1beta1": The API version to use when talking to the server
  -a, --auth-path="/home/fedora/.kubernetes_auth": Path to the auth info file. If missing, prompt the user. Only used if using https.
      --certificate-authority=: Path to a cert. file for the certificate authority.
      --client-certificate=: Path to a client key file for TLS.
      --client-key=: Path to a client key file for TLS.
  -h, --help=false: help for describe
      --insecure-skip-tls-verify=%!s(bool=false): If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
      --loglevel=0: Set the level of log output (0-5)
      --match-server-version=false: Require server version to match client version
  -n, --namespace="": If present, the namespace scope for this CLI request.
      --ns-path="/home/fedora/.kubernetes_ns": Path to the namespace info file that holds the name space context to use for CLI requests.
  -s, --server="": The address of the Kubernetes API server
      --token=: Bearer token for authentication to the API server.


Error: Usage of osc:
      --api-version="v1beta1": The API version to use when talking to the server
  -a, --auth-path="/home/fedora/.kubernetes_auth": Path to the auth info file. If missing, prompt the user. Only used if using https.
      --certificate-authority=: Path to a cert. file for the certificate authority.
      --client-certificate=: Path to a client key file for TLS.
      --client-key=: Path to a client key file for TLS.
      --insecure-skip-tls-verify=%!s(bool=false): If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
      --loglevel=0: Set the level of log output (0-5)
      --match-server-version=false: Require server version to match client version
  -n, --namespace="": If present, the namespace scope for this CLI request.
      --ns-path="/home/fedora/.kubernetes_ns": Path to the namespace info file that holds the name space context to use for CLI requests.
  -s, --server="": The address of the Kubernetes API server
      --token=: Bearer token for authentication to the API server.

Comment 4 Yan Du 2015-01-07 08:38:31 UTC
Test fedora_514, the example in help info is not correct too.

eg:
[fedora@ip-10-169-236-217 sample-app]$ osc create -h
Create a resource by filename or stdin.

JSON and YAML formats are accepted.

Examples:
  $ kubectl create -f pod.json
  <create a pod using the data in pod.json>

  $ cat pod.json | kubectl create -f -
  <create a pod based on the json passed into stdin>

Comment 5 Fabiano Franz 2015-02-04 15:03:11 UTC
Fixed in master.

Comment 6 XiuJuan Wang 2015-02-05 03:30:32 UTC
These issues have been fixed in fedora_701

'openshift cli' and 'osc' style command both show correctly.

Thanks!

Comment 7 Yan Du 2015-02-05 09:30:54 UTC
Seems we still use the "kubectl" in the cmd examples:

eg:
Examples:
  $ kubectl namespace 
  Using namespace default

  $ kubectl namespace other
  Set current namespace to other

we may need to update the "kubectl" to "osc" in the examples too.

Comment 8 Fabiano Franz 2015-02-05 16:33:13 UTC
That's ok for now, we have a separate task to review the help *content* all around the CLI. Keeping this bug as the "-h/--help" and "help <command>" fixes.

Comment 9 Yan Du 2015-02-06 02:39:03 UTC
Thanks for your explanation @Fabiano Franz

Move bug to verified.


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