Bug 1944581

Summary: oc project not works with cluster proxy
Product: OpenShift Container Platform Reporter: Wu Siu Wa <siwu>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs, haowang, jokerman, mfojtik
Target Milestone: ---Keywords: ServiceDeliveryImpact
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Not all options from config were copied when switching projects. Consequence: When using proxy through Exec configuration in kubeconfig that information was lost during project switch. Fix: Copy all the necessary information when switching projects. Result: oc project works when using proxy.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:56:24 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:
Bug Depends On:    
Bug Blocks: 1963784    

Description Wu Siu Wa 2021-03-30 09:31:38 UTC
Description of problem:
We are using kubectl proxy to access openshift clusters. And use Exec to authenticate, instead of token.

When switching project using `oc project` command, it will create a new user without Exec config. Then, the user will fail authentication.

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


How reproducible:


Steps to Reproduce:
1. Set Exec in kubeconfig
2. Run `oc project` to switch project
3. New user&context created without Exec config.

Actual results:
New user&context created without Exec config.

Expected results:
The newly created user should use the same Exec config.

Additional info:
https://github.com/openshift/oc/issues/647

Comment 1 Michal Fojtik 2021-04-29 10:06:11 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Additionally, you can add LifecycleFrozen into Keywords if you think this bug should never be marked as stale. Please consult with bug assignee before you do that.

Comment 2 Wu Siu Wa 2021-04-29 11:05:12 UTC
This bug still affecting usage.

Comment 3 Michal Fojtik 2021-04-29 11:06:17 UTC
The LifecycleStale keyword was removed because the needinfo? flag was reset and the bug got commented on recently.
The bug assignee was notified.

Comment 7 zhou ying 2021-05-20 05:44:02 UTC
Can't reproduce the issue now, will move to verified status.

Comment 10 errata-xmlrpc 2021-07-27 22:56:24 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438