Bug 1577131
| Summary: | [svcat] some svcat output information not clear | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | sunzhaohua <zhsun> |
| Component: | Service Catalog | Assignee: | Marko Luksa <mluksa> |
| Status: | CLOSED ERRATA | QA Contact: | Dongbo Yan <dyan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.10.0 | CC: | chezhang, jaboyd, zhsun |
| Target Milestone: | --- | ||
| Target Release: | 3.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-11 07:19:10 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
sunzhaohua
2018-05-11 09:20:29 UTC
In plugin model, `oc plugin svcat` and `oc plugin svcat -h` ,they have different gloable flags. one is same with svcat command, one is same with oc command. I tried oc options are worked. But this cause misunderstandings. # oc plugin svcat get brokers --v=7 I0514 02:21:20.923473 18753 loader.go:357] Config loaded from file /root/.kube/config I0514 02:21:20.940391 18762 loader.go:357] Config loaded from file /root/.kube/config I0514 02:21:20.941579 18762 round_trippers.go:383] GET https://qe-zhsun-gce-310-513master-etcd-1:8443/apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers I0514 02:21:20.941609 18762 round_trippers.go:390] Request Headers: I0514 02:21:20.941621 18762 round_trippers.go:393] Accept: application/json, */* I0514 02:21:20.941632 18762 round_trippers.go:393] User-Agent: svcat/v0.0.0 (linux/amd64) kubernetes/$Format I0514 02:21:20.941699 18762 round_trippers.go:393] Authorization: Bearer ImjzDu5qR2FtqjBX3hFC85Ajtle8kmTE84jysnKRaeg I0514 02:21:20.958427 18762 round_trippers.go:408] Response Status: 200 OK in 16 milliseconds NAME URL STATUS +-------------------------+-------------------------------------------------------------------------------------------+--------+ ansible-service-broker https://asb.openshift-ansible-service-broker.svc:1338/ansible-service-broker Ready template-service-broker https://apiserver.openshift-template-service-broker.svc:443/brokers/template.openshift.io Ready # oc plugin svcat get brokers -v=7 Error: unknown shorthand flag: 'v' in -v=7 In plugin model, `oc options` doesn't include logtostderr option. run `oc plugin svcat get brokers --logtostderr` show error.
# oc plugin svcat
Usage:
svcat [flags]
svcat [command]
Available Commands:
bind Binds an instance's metadata to a secret, which can then be used by an application to connect to the instance
completion Output shell completion code for the specified shell (bash).
deprovision Deletes an instance of a service
describe Show details of a specific resource
get List a resource, optionally filtered by name
install
provision Create a new instance of a service
sync Syncs service catalog for a service broker
touch Force Service Catalog to reprocess a resource
unbind Unbinds an instance. When an instance name is specified, all of its bindings are removed, otherwise use --name to remove a specific binding
version Provides the version for the Service Catalog client and server
Flags:
--context string name of the kubeconfig context to use.
-h, --help help for svcat
--kubeconfig string path to kubeconfig file. Overrides $KUBECONFIG
--logtostderr log to standard error instead of files (default false)
-v, --v Level log level for V logs
Use "svcat [command] --help" for more information about a command.
# oc plugin svcat -h
The Kubernetes Service Catalog Command-Line Interface (CLI)
Usage:
oc plugin svcat [flags]
Available Commands:
bind Binds an instance's metadata to a secret, which can then be used by an application to connect to the
instance
completion Output shell completion code for the specified shell (bash).
deprovision Deletes an instance of a service
describe Show details of a specific resource
get List a resource, optionally filtered by name
help Help about any command
install
provision Create a new instance of a service
sync Syncs service catalog for a service broker
touch Force Service Catalog to reprocess a resource
unbind Unbinds an instance. When an instance name is specified, all of its bindings are removed, otherwise use
--name to remove a specific binding
version Provides the version for the Service Catalog client and server
Use "oc <command> --help" for more information about a given command.
Use "oc options" for a list of global command-line options (applies to all commands).
# oc plugin svcat get brokers --logtostderr
Error: unknown flag: --logtostderr
Usage:
oc plugin svcat get brokers [flags]
Options:
-o, --output='': The output format to use. Valid options are table, json or yaml. If not present, defaults to table
Use "oc options" for a list of global command-line options (applies to all commands).
# svcat get brokers --logtostderr
NAME URL STATUS
+-------------------------+-------------------------------------------------------------------------------------------+--------+
ansible-service-broker https://asb.openshift-ansible-service-broker.svc:1338/ansible-service-broker Ready
template-service-broker https://apiserver.openshift-template-service-broker.svc:443/brokers/template.openshift.io Ready
I've fixed 3), 4) and 5), and also a part of 1). PR for 3 and 4: https://github.com/kubernetes-incubator/service-catalog/pull/2050 (already merged) PR for 5: https://github.com/kubernetes-incubator/service-catalog/pull/2056 PR for one part of 1): https://github.com/kubernetes-incubator/service-catalog/pull/2044 The other aspects of 1) and 2) are much harder to fix. Can you open two separate bug reports for those? And describe what exactly you'd like to see as a solution? The problem is that oc plugin svcat and oc plugin svcat --help are executed very differently. The first command actually invokes the plugin, while the other one doesn't - it only invokes oc and it then prints out the help messages. I've looked into how we could have them both have identical output, but that just isn't possible at the moment. Oc and svcat each use its own help output template. The scope of flags is also problematic, because we have three scopes of flags when running oc plugin svcat foo: - the local flags used by svcat's foo command - the global svcat flags - the global oc flags IMHO, they should be listed as three separate groups. But there's some overlap between them (like in the case of the --v flag). At this time, this seems like way too much work for very little benefit. Can you help identify individual problems instead of what you describe under 1)? 1)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.At least we should point out this in document. 2)I think we should specified separately for three scopes of flags. For svcat's foo command flags and global svcat flags maybe we can refer to `oc options` to set it as "--v=0: Set the level of log output (0-10)". For oc flags we keep default is ok. 3.10 is closing out, moving target release to 3.11. This has been picked up by OpenShift 3.11. Anything built since 18 July will include it, please make certain Service Catalog build is v0.1.24 or later. Some display problems still exist for v0.1.27, such as: [root@qe-jiazha-round2master-etcd-1 ~]# oc plugin svcat sync broker -h Syncs service catalog for a service broker Usage: oc plugin svcat sync broker [flags] [root@qe-jiazha-round2master-etcd-1 ~]# oc plugin svcat install plugin Error: unknown command "install" for "svcat" Run 'svcat --help' for usage. error: exit status 1 ... [root@qe-jiazha-round2master-etcd-1 ~]# svcat version Client Version: v3.11.0-0.13.0;Upstream:v0.1.27 Server Version: v1.11.0+d4cacc0 [root@qe-jiazha-round2master-etcd-1 ~]# oc plugin svcat version Client Version: v3.11.0-0.13.0;Upstream:v0.1.27 Server Version: v1.11.0+d4cacc0 Test with Client Version: v3.11.0-0.20.0;Upstream:v0.1.29 1) # oc plugin svcat get broker --logtostderr no error outputs 2) track in bz1581185 3) $svcat --help install Install Service Catalog related tools $oc plugin svcat --help cannot see install command 4) no need execute install command in plugin model 5) all command usage have added [name] move to verified 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 |