| Summary: | User login will take time to load kube config repeatly way too many times. | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | XiaochuanWang <xiaocwan> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED EOL | QA Contact: | Wei Sun <wsun> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.2.0 | CC: | aos-bugs, deads, jokerman, mmccomas, trankin, wsun |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-21 08:41:43 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: | |
Created attachment 1146702 [details]
login_origin.log
The way it reproduced is there are so many content on local .kube/config. Will not reproduced if clear the config. Looks like the code(https://github.com/openshift/origin/blob/388478c40e751c4295dcb9a44dd69e5ac65d0e3b/pkg/cmd/cli/cmd/loginoptions.go#L235) will load multiple time for the for loop on the contexts. And better move the following logic out of the for loops: clientcmdConfig := kclientcmd.NewDefaultClientConfig(kubeconfig, &kclientcmd.ConfigOverrides{CurrentContext: key}) if kubeconfigClientConfig, err := clientcmdConfig.ClientConfig(); err == nil { Closing due to age, also it was addressed in one of the later releases. |
Created attachment 1146701 [details] login_ose.log Description of problem: When user login, it'll load config way too many times. Version-Release number of selected component (if applicable): oc v3.2.0.14 openshift v3.2.0.14 kubernetes v1.2.0-36-g4a3f9c5 How reproducible: Always Steps to Reproduce: oc login with loglevel=8 and check Actual results: It'll take a while to load config over again and again. Log shows as below: I0413 13:04:12.645794 6295 loader.go:242] Config loaded from file /root/.kube/config Refer to "login_ose.log" Expected results: Shouldn't be so many times to load config Additional info: From origin: "login_origin.log"