Bug 1825791 - oc login is very chatty
Summary: oc login is very chatty
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-20 09:49 UTC by Maciej Szulik
Modified: 2020-07-13 17:28 UTC (History)
3 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 373 0 None closed Bug 1825791: Fix a large number of silly things in login 2020-06-23 10:06:37 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:28:54 UTC

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


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