Bug 1585127 - "svcat version" doesn't report version when it can't connect to server
Summary: "svcat version" doesn't report version when it can't connect to server
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: Jay Boyd
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-01 10:22 UTC by sunzhaohua
Modified: 2018-10-11 07:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: If the cluster is not running or is not reachable, the command `svcat version` resulted in an error. Fix: Code has been changed to always report the client version and if the server is reachable, it then reports the server version. Result: The command `svcat version` now always reports the client version. If the server is available, it also reports the server version.
Clone Of:
Environment:
Last Closed: 2018-10-11 07:20:33 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:21:34 UTC

Description sunzhaohua 2018-06-01 10:22:35 UTC
Description of problem:
 "svcat version" doesn't report version when it can't connect to server

Version-Release number of selected component (if applicable):
$ svcat version
client: v0.1.13
server: v1.10.0+b81c8f8

How reproducible:
Always

Steps to Reproduce:
1. run "oc version" remotely .
2. run "svcat version" remotely when it can't connect to server.
3. run "svcat version" remotely when it can connect to server.

Actual results:
 "svcat version" doesn't report version when it can't connect to server
 
1)[szh@localhost ~]$ oc version
oc v3.9.11
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://host-8-250-216.host.centralci.eng.rdu2.redhat.com:8443
openshift v3.10.0-0.56.0
kubernetes v1.10.0+b81c8f8

2)[szh@localhost ~]$ svcat version
Error: unable to get version, the server has asked for the client to provide credentials

3)[szh@localhost ~]$ oc login https://host-8-250-217.host.centralci.eng.rdu2.redhat.com:8443

[szh@localhost ~]$ svcat version
client: v3.10.0-0.56.0;Upstream:v0.1.19
server: v1.10.0+b81c8f8

Expected results:
 "svcat version" report version when it can't connect to server
 

Additional info:

Comment 1 Jay Boyd 2018-06-01 13:16:18 UTC
svcat version --client   looks to always work.  Reviewing the code, this is working as intended.

$ svcat version --help
Provides the version for the Service Catalog client and server

Usage:
  svcat version [flags]

Examples:

  svcat version
  svcat version --client


Flags:
  -c, --client   Show only the client version


I'm going to close this, looks to work as intended.

Comment 2 Aleksandar Kostadinov 2018-06-04 14:45:41 UTC
`oc` client works differently. If connection is impossible it shows only client version. If connection to server is possible it returns both versions. It is fine to have the `--client` option, but this doesn't mean we shouldn't offer a default behavior that makes more sense.

I don't think existing code can be reason to close a bug about undesirable/confusing behavior.

To me this behavior is inconsistent with existing cli tools and will likely be a source of confusion for users thus better be changed in line with existing cli tools we provide for OpenShift.

Comment 3 Jay Boyd 2018-06-04 18:12:42 UTC
created upstream issue to rework svcat version reporting:  https://github.com/kubernetes-incubator/service-catalog/issues/2092

Comment 4 Jay Boyd 2018-07-25 18:02:57 UTC
fixed via upstream https://github.com/kubernetes-incubator/service-catalog/pull/2109  and included in OpenShift by https://github.com/openshift/service-catalog/releases/tag/v3.11.0-0.1.25 (builds newer then July 18)

Comment 5 Dongbo Yan 2018-08-17 07:42:16 UTC
Test with
# svcat version
Client Version: v3.11.0-0.16.0;Upstream:v0.1.27
Error: unable to get version, Get https://qe-dyan-311-master-etcd-1.0816-3r9.qe.rhcloud.com:8443/version?timeout=32s: dial tcp 104.198.144.246:8443: i/o timeout

# oc plugin svcat version
Client Version: v3.11.0-0.16.0;Upstream:v0.1.27
Error: unable to get version, Get https://qe-dyan-311-master-etcd-1.0816-3r9.qe.rhcloud.com:8443/version?timeout=32s: dial tcp 104.198.144.246:8443: i/o timeout
error: exit status 1

could move to verified

Comment 8 errata-xmlrpc 2018-10-11 07:20:33 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.