Bug 1825791

Summary: oc login is very chatty
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:28:40 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 Maciej Szulik 2020-04-20 09:49:47 UTC
Currently oc login is calling Users.Get("~") three times during login, we should not do this that often.

Comment 3 zhou ying 2020-04-22 06:32:11 UTC
Confirmed with latest oc client, no repeatedly calling for `users.Get("~")`

[zhouying@dhcp-140-138 ~]$ oc version -o yaml 
clientVersion:
  buildDate: "2020-04-20T21:43:28Z"
  compiler: gc
  gitCommit: 8dda2e784003f0bd16142a3c4a63924768bdd891
  gitTreeState: clean
  gitVersion: 4.5.0-202004202137-8dda2e7
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64


[zhouying@dhcp-140-138 ~]$ oc login --token='iiqnpFKEhk-QP1OWfLF0CFTIKzXuosBynhP9B8FS2es'  https://api.xxxxxxxx:6443 -v 7
............................
You don't have any projects. You can try to create a new project, by running

    oc new-project <projectname>

I0422 14:04:31.273705   15269 round_trippers.go:420] GET https://api.xxxxxx:6443/api/v1/namespaces/openshift/configmaps/motd
I0422 14:04:31.273727   15269 round_trippers.go:427] Request Headers:
I0422 14:04:31.273740   15269 round_trippers.go:431]     Accept: application/json, */*
I0422 14:04:31.273753   15269 round_trippers.go:431]     Authorization: Bearer <masked>
I0422 14:04:31.273769   15269 round_trippers.go:431]     User-Agent: oc/4.5.0 (linux/amd64) kubernetes/8dda2e7
I0422 14:04:31.527189   15269 round_trippers.go:446] Response Status: 404 Not Found in 253 milliseconds
I0422 14:04:31.530464   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
I0422 14:04:31.534395   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
I0422 14:04:31.537737   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
I0422 14:04:31.541910   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
I0422 14:04:31.545663   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
I0422 14:04:31.549616   15269 loader.go:375] Config loaded from file:  /home/zhouying/.kube/config
[zhouying@dhcp-140-138 ~]$

Comment 4 errata-xmlrpc 2020-07-13 17:28:40 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