Description of problem: oc version shows the version of oc and kubernetes. It does not show the version of OpenShift the master is running. It would be nice if the user could tell which version of OpenShift is running on the server side similar to what's provided by the web console in the About section. Version-Release number of selected component (if applicable): 3.2.1.4 How reproducible: Everytime Steps to Reproduce: 1. Run: oc version 2. 3. Actual results: oc v3.2.1.4-1-g1864c8f kubernetes v1.2.0-36-g4a3f9c5 Expected results: OpenShift Master v3.2.1.4-1-g1864c8f oc v3.2.1.4-1-g1864c8f kubernetes v1.2.0-36-g4a3f9c5 Additional info: Knowing what version your master is running can be useful when understanding what features are possibly available and supported in a given installation. It can also aid you in deciding what client you should be running.
Related PR: https://github.com/openshift/origin/pull/9785
Running the command on MASTER, it outputs # openshift version openshift v3.3.0.12 kubernetes v1.3.0+57fb9ac etcd 2.3.0+git Server https://master-server-url:8443 OpenShift v3.3.0.12 Kubernetes v1.3.0+57fb9ac Is it expected ?
Another confusion: `oc version` sometimes gives error: error: server took too long to respond with version information Other times gives error (against old server not supporting this API): Error from server: User "xxia" cannot "get" on "/version/openshift" Other times gives error (against not existing host. E.g. the cluster in ~/.kube/config is down): Unable to connect to the server: dial tcp <not existing host>:8443: getsockopt: no route to host As a user, he may not always want to check server version via `oc version`. Many times, he may just want to check LOCAL oc version. Afraid the above errors (and response timeout) might make user feel not well. How about implementing the feature via flag? E.g. --get-server-version[=false], if user really wants to check server version, he could explicitly run `oc version --get-server-version`, otherwise, `oc version` just shows local oc version.
> Running the command on MASTER, it outputs > # openshift version > openshift v3.3.0.12 > kubernetes v1.3.0+57fb9ac > etcd 2.3.0+git > > Server https://master-server-url:8443 > OpenShift v3.3.0.12 > Kubernetes v1.3.0+57fb9ac > > > Is it expected ? Thanks for catching this, it has been addressed in this PR: https://github.com/openshift/origin/pull/10093 > Another confusion: `oc version` sometimes gives error: > error: server took too long to respond with version information Yes, this is working as expected, there is a 10 second timeout so that the command does not hang for too long. > Other times gives error (against old server not supporting this API): > Error from server: User "xxia" cannot "get" on "/version/openshift" This has also been addressed in the PR mentioned above. > Other times gives error (against not existing host. E.g. the cluster in ~/.kube/config is down): > Unable to connect to the server: dial tcp <not existing host>:8443: getsockopt: no route to host I will update the PR (https://github.com/openshift/origin/pull/10093) to handle this.
Seems works well now and could be moved to ON_QA and then VERIFIED by QE
This one should have been fixed for a long time. $ oc version oc v3.7.0-0.127.0 kubernetes v1.7.0+80709908fd features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://my-server:443 openshift v3.6.173.0.21 kubernetes v1.6.1+5115d708d7
Right, thanks, I'd like to move it to VERIFIED directly