Bug 1888657

Summary: oc doesn't know its name
Product: OpenShift Container Platform Reporter: Oleg Bulatov <obulatov>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: RamaKasturi <knarra>
Severity: low Docs Contact:
Priority: low    
Version: 4.6CC: aos-bugs, jokerman, knarra, mfojtik
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:26:15 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 Oleg Bulatov 2020-10-15 12:52:31 UTC
Description of problem:

When `oc login` suggests to use `oc projects`, it prints only ` projects`.

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

master (ef8cad49356c6d29a6f41ce9ac98a7bd65783d1e)
something from 4.6 (eadaf8954be1a1bc3a0cdf4db5e89fde3ac7e0f2)

How reproducible:

Always.

Steps to Reproduce:
1. oc login https://api.ci.openshift.org --token=REDACTED

Actual results:

You have access to REDACTED projects, the list has been suppressed. You can list all projects with ' projects'

Expected results:

You have access to REDACTED projects, the list has been suppressed. You can list all projects with 'oc projects'

Additional info:

Comment 2 zhou ying 2020-10-28 02:31:59 UTC
Will check this issue when new oc available.

Comment 3 RamaKasturi 2020-11-09 13:58:24 UTC
Verified with the payload below and i see that the fix works.

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2020-11-08-225909]$ ./oc version
Client Version: 4.7.0-0.nightly-2020-11-08-225909
Server Version: 4.7.0-0.nightly-2020-10-27-051128
Kubernetes Version: v1.19.0+e67f5dc

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2020-11-08-225909]$ ./oc login https://api.ci.openshift.org --token=REDACTED
Logged into "https://api.ci.openshift.org:443" as "kasturinarra" using the token provided.

You have access to the following projects and can switch between them with 'oc project <projectname>':

with older version of oc below is seen:
======================================
[knarra@knarra cluster-kube-scheduler-operator]$ oc version
Client Version: 4.6.0-202010150713.p0-074039a
Kubernetes Version: v1.11.0+d4cacc0

[knarra@knarra ~]$ oc login https://api.ci.openshift.org --token=REDACTED
Logged into "https://api.ci.openshift.org:443" as "kasturinarra" using the token provided.

You have access to the following projects and can switch between them with ' project <projectname>':

Based on the above moving bug to verified state.

Comment 6 errata-xmlrpc 2021-02-24 15:26:15 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.7.0 security, bug fix, and enhancement 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-2020:5633