Bug 1873314

Summary: OC login breaks all other contexts where the user has the same name
Product: OpenShift Container Platform Reporter: aaleman
Component: ocAssignee: Sally <somalley>
Status: CLOSED DUPLICATE QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, jokerman, maszulik, mfojtik
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-28 09:46:46 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 aaleman 2020-08-27 19:59:04 UTC
Description of problem:

I work with multiple clusters where my username is the same. If I `oc login` into one of them, a kubeconfig context is generated that looks like this:

```
- context:
 cluster: api-ci-openshift-org:443
 namespace: ci
 user: alvaroaleman
```

The newly generated user named `alvaroaleman` has no cluster identifier attached. This means that if I log into another cluster where my user is also named `alvaroaleman`, this context will stop working.

This is a huge UX issue and used to not be the case in an earlier version of `oc` (4.3 something?)


Version-Release number of selected component (if applicable):

$ oc version
Client Version: openshift-clients-4.5.0-202006231303.p0-4-gb66f2d3a6
Server Version: 4.4.11
Kubernetes Version: v1.17.1+166b070



How reproducible: 100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Maciej Szulik 2020-08-28 09:46:46 UTC

*** This bug has been marked as a duplicate of bug 1868384 ***