Bug 1888657 - oc doesn't know its name
Summary: oc doesn't know its name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Maciej Szulik
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-15 12:52 UTC by Oleg Bulatov
Modified: 2021-02-24 15:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:26:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 616 0 None closed Bug 1888657: set command name for LoginOptions 2021-01-07 17:14:01 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:26:32 UTC

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


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