Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1199954

Summary: Invalid "name" parameter is used when user login in project
Product: OpenShift Container Platform Reporter: xjia <xjia>
Component: NodeAssignee: David Eads <deads>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 3.0.0CC: bleanhar, dmcphers, jokerman, libra-onpremise-devel, mmccomas, xtian
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: 2015-11-23 14:43:50 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 xjia 2015-03-09 11:14:49 UTC
Description of problem:
Go to page : https://github.com/openshift/training/blob/master/beta-2-setup.md#login 
When executing the following command, it show error message "unknown flag: --certificate-authority".

openshift ex login \
--certificate-authority=/var/lib/openshift/openshift.local.certificates/ca/root.crt \
--cluster=master --server=https://ose3-master.example.com:8443 \
--namespace=demo --name=demo

Check the parameter which 'Global Options:' supports. there's no 'name' parameter.

And another issue is "the error message is confusing users", the root cause is "name" parameter instead of --certificate-authority.

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

How reproducible:
always

Steps to Reproduce:
1. https://github.com/openshift/training/blob/master/beta-2-setup.md#login 
2. # su - joe
3. mkdir .kube
4. cd ~/.kube
5. openshift ex login \
--certificate-authority=/var/lib/openshift/openshift.local.certificates/ca/root.crt \
--cluster=master --server=https://ose3-master.example.com:8443 \
--namespace=demo --name=demo

Actual results:
[joe@ose-all .kube]$ openshift ex login --certificate-authority=/var/lib/openshift/openshift.local.certificates/ca/root.crt  --cluster=master --server=https://ose3-master.example.com:8443 --namespace=demo --name=demo
unknown flag: --certificate-authority

Usage: 
  openshift ex login [options]


Global Options:
      --alsologtostderr=false: log to standard error as well as files
      --api-version="": The API version to use when talking to the server
      --auth-path="": 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.
      --cluster="": The name of the kubeconfig cluster to use
      --context="": The name of the kubeconfig context to use
  -h, --help=false: help for login
      --insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
      --kubeconfig="": Path to the kubeconfig file to use for CLI requests.
      --log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
      --log_dir=: If non-empty, write log files in this directory
      --log_flush_frequency=5s: Maximum number of seconds between log flushes
      --loglevel=0: Set the level of log output (0-5)
      --logtostderr=true: log to standard error instead of files
      --match-server-version=false: Require server version to match client version
  -n, --namespace="": If present, the namespace scope for this CLI request.
      --password="": Password for basic authentication to the API server.
      --server="": The address and port of the Kubernetes API server
      --stderrthreshold=2: logs at or above this threshold go to stderr
      --token="": Bearer token for authentication to the API server.
      --user="": The name of the kubeconfig user to use
      --username="": Username for basic authentication to the API server.
      --v=0: log level for V logs
      --validate=false: If true, use a schema to validate the input before sending it
      --vmodule=: comma-separated list of pattern=N settings for file-filtered logging


Expected results:
Delete 'name' parameter or add 'name' parameter supported, and give the right error message if user uses wrong parameters.


Additional info:

Comment 2 Scott Dodson 2015-03-09 12:49:53 UTC
github issue : https://github.com/openshift/origin/issues/1249

Comment 3 David Eads 2015-04-28 15:21:05 UTC
At some point this was fixed with a cobra patch.

Comment 4 xjia 2015-04-30 08:03:37 UTC
Verify:
[root@master ~]# openshift ex login --certificate-authority=/var/lib/openshift/openshift.local.certificates/ca/cert.crt  --cluster=master --server=https://master.local:8443 --namespace=demo --name=demo
Error: unknown flag: --name
Run 'openshift help' for usage.

Version:
openshift v0.4.4.0-51-g4f048c9
kubernetes v0.14.1-582-gb12d75d

Comment 5 Brenton Leanhardt 2015-06-24 17:35:53 UTC
I'm using this bug to test out the external GitHub tracking.  Nothing to see here...