Bug 1827093 - `oc version` client fails on 4.5 without any kubeconfig
Summary: `oc version` client fails on 4.5 without any kubeconfig
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.5.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-23 09:19 UTC by David Sanz
Modified: 2020-07-13 17:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:30:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:31:03 UTC

Description David Sanz 2020-04-23 09:19:58 UTC
Description of problem:

On 4.5 client, oc version executed without any kubeconfig file fails, but it works on 4.4 showing, at least, the client version

$ 4.4/oc version
Client Version: 4.4.0-0.nightly-2020-04-23-042651

$ 4.5/oc version
error: Missing or incomplete configuration info.  Please point to an existing, complete config file:
  1. Via the command-line flag --kubeconfig
  2. Via the KUBECONFIG environment variable
  3. In your home directory as ~/.kube/config
To view or setup config directly use the 'config' command.

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-04-23-081727

How reproducible:
1. Download tools from nightly version `oc adm release extract --tools registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-04-23-081727`
2. Extract `tar xzvf openshift-client-linux-4.5.0-0.nightly-2020-04-23-081727.tar.gz`
3. Unset any kubeconfig and delete any ~/.kube/config file

Actual results:
Command fails

Expected results:
If no kubeconfig file is detected, it should print, at least, the client info

Additional info:

Comment 1 Maciej Szulik 2020-04-23 11:18:37 UTC
This is a known upstream problem, we'll need to pick these 2 PRs:
- https://github.com/kubernetes/kubernetes/pull/90243
- https://github.com/kubernetes/kubernetes/pull/89913

Comment 2 Maciej Szulik 2020-05-08 17:32:40 UTC
Should be fixed in https://github.com/openshift/oc/pull/409

Comment 5 zhou ying 2020-05-09 06:39:12 UTC
[yinzhou@localhost ~]$ oc version --kubeconfig=/tmp/kubeconfig -o yaml
clientVersion:
  buildDate: "2020-05-07T22:03:52Z"
  compiler: gc
  gitCommit: f415627b3a8df305c4dd0ada0b4bc1271846a777
  gitTreeState: clean
  gitVersion: 4.5.0-202005072157-f415627
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64

[yinzhou@localhost ~]$ cat /tmp/kubeconfig 


[yinzhou@localhost ~]$ oc version -o yaml 
clientVersion:
  buildDate: "2020-05-07T22:03:52Z"
  compiler: gc
  gitCommit: f415627b3a8df305c4dd0ada0b4bc1271846a777
  gitTreeState: clean
  gitVersion: 4.5.0-202005072157-f415627
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64

Comment 6 errata-xmlrpc 2020-07-13 17:30:50 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-2020:2409


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