Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1585127 - "svcat version" doesn't report version when it can't connect to server
"svcat version" doesn't report version when it can't connect to server
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Catalog (Show other bugs)
3.10.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.11.0
Assigned To: Jay Boyd
Dongbo Yan
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-01 06:22 EDT by sunzhaohua
Modified: 2018-10-11 03:21 EDT (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:20:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:21 EDT

  None (edit)
Description sunzhaohua 2018-06-01 06:22:35 EDT
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 09:16:18 EDT
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 10:45:41 EDT
`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 14:12:42 EDT
created upstream issue to rework svcat version reporting:  https://github.com/kubernetes-incubator/service-catalog/issues/2092
Comment 4 Jay Boyd 2018-07-25 14:02:57 EDT
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 03:42:16 EDT
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 03:20:33 EDT
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.