Bug 1581183 - [svcat]`oc plugin svcat --help` and `oc plugin svcat` help information are different
Summary: [svcat]`oc plugin svcat --help` and `oc plugin svcat` help information are di...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Catalog
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: Marko Luksa
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-22 09:54 UTC by sunzhaohua
Modified: 2018-10-11 07:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-11 07:20:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:20:30 UTC

Description sunzhaohua 2018-05-22 09:54:34 UTC
Description of problem:
Run `oc plugin svcat --help` and `oc plugin svcat` output information are different. And I tried, oc options are work.
For example, I run `oc plugin svcat get brokers -v=7`, it is not work. But `svcat get brokers -v=7` and `oc plugin svcat get brokers --v=7` work.



Version-Release number of selected component (if applicable):
# svcat version
client: v3.10.0-0.50.0;Upstream:v0.1.19
server: v1.10.0+b81c8f8

How reproducible:
Always

Steps to Reproduce:
1.run `oc plugin svcat --help` and `oc plugin svcat`
2.
3.

Actual results:
Oc and svcat each use its own help output template. This cause output information are different. And oc options are work.

# oc plugin svcat get brokers -v=7
Error: unknown shorthand flag: 'v' in -v=7

# oc plugin svcat get brokers --v=7
I0522 05:51:53.751742   30291 loader.go:357] Config loaded from file /root/.kube/config
I0522 05:51:53.768634   30300 loader.go:357] Config loaded from file /root/.kube/config
I0522 05:51:53.769879   30300 round_trippers.go:383] GET https://ip-172-18-12-36.ec2.internal:8443/apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers
I0522 05:51:53.769914   30300 round_trippers.go:390] Request Headers:
I0522 05:51:53.769931   30300 round_trippers.go:393]     Accept: application/json, */*
I0522 05:51:53.769948   30300 round_trippers.go:393]     User-Agent: svcat/v0.0.0 (linux/amd64) kubernetes/$Format
I0522 05:51:53.769962   30300 round_trippers.go:393]     Authorization: Bearer Un4eO4Lep4qDe9sHKIIf9lTiISbFErHO-IirOjQD-Rg
I0522 05:51:53.788600   30300 round_trippers.go:408] Response Status: 200 OK in 18 milliseconds
           NAME                                                URL                                        STATUS  
+------------------------+------------------------------------------------------------------------------+--------+
  ansible-service-broker   https://asb.openshift-ansible-service-broker.svc:1338/ansible-service-broker   Ready   

Expected results:
If now we couldn't have them both have identical output. I think we should let them have same name.For example, rename "--kubeconfig" to "--config=". delete "-v" and hold "--v" only.  I don't know how to deal with "--logtostderr" option. `oc options` doesn't include logtostderr option.

Additional info:

Comment 1 Jay Boyd 2018-05-22 13:29:03 UTC
Marko could you take this?

Comment 2 Jay Boyd 2018-05-22 15:23:57 UTC
moving target release to 3.11, only taking blockers for 3.10

Comment 3 Jay Boyd 2018-08-07 17:53:23 UTC
These all appear to me to be fixed.  Anything built since 18 July will include it, please make certain Service Catalog build is v0.1.24 or later.

Comment 5 Dongbo Yan 2018-08-23 11:22:37 UTC
Test with
# oc plugin svcat version
Client Version: v3.11.0-0.20.0;Upstream:v0.1.29
Server Version: v1.11.0+d4cacc0

# oc plugin svcat get broker -v 7
I0823 19:17:25.968274   11895 loader.go:359] Config loaded from file /root/.kube/config
I0823 19:17:26.028112   11901 loader.go:359] Config loaded from file /root/.kube/config
I0823 19:17:26.036023   11901 round_trippers.go:383] GET https://host-:8443/apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers
I0823 19:17:26.036791   11901 round_trippers.go:390] Request Headers:
I0823 19:17:26.037440   11901 round_trippers.go:393]     Accept: application/json, */*
I0823 19:17:26.038065   11901 round_trippers.go:393]     User-Agent: svcat/v0.0.0 (linux/amd64) kubernetes/$Format
I0823 19:17:26.038815   11901 round_trippers.go:393]     Authorization: Bearer UySRBY_11zbtUh2Mi3rDWXylXYYqEzGsaGyx5SeEo8Y
I0823 19:17:27.288865   11901 round_trippers.go:408] Response Status: 403 Forbidden in 1249 milliseconds
Error: unable to list cluster-scoped brokers (clusterservicebrokers.servicecatalog.k8s.io is forbidden: User "dyan1" cannot list clusterservicebrokers.servicecatalog.k8s.io at the cluster scope: no RBAC policy matched)
error: exit status 1

Comment 7 errata-xmlrpc 2018-10-11 07:20:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2652


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