Bug 1873314 - OC login breaks all other contexts where the user has the same name
Summary: OC login breaks all other contexts where the user has the same name
Status: CLOSED DUPLICATE of bug 1868384
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.6.0
Assignee: Sally
QA Contact: zhou ying
Depends On:
TreeView+ depends on / blocked
Reported: 2020-08-27 19:59 UTC by aaleman
Modified: 2020-08-28 09:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-08-28 09:46:46 UTC
Target Upstream Version:

Attachments (Terms of Use)

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:

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 ***

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