Bug 1797929 - Confusing error message when get cluster resources in project
Summary: Confusing error message when get cluster resources in project
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-04 09:08 UTC by Liang Xia
Modified: 2020-07-13 17:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:13:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:14:09 UTC

Description Liang Xia 2020-02-04 09:08:26 UTC
Description of problem:
When getting cluster resources in a project, the error message is confusing.
$ oc get pv
No resources found in openshift-csi-snapshot-controller namespace.



Version-Release number of selected component (if applicable):
$ rpm -q openshift-clients
openshift-clients-4.4.0-202001310654.git.1.e04481f.el7.x86_64            
$ oc version -o yaml --client
clientVersion:
  buildDate: ""
  compiler: gc
  gitCommit: ""
  gitTreeState: ""
  gitVersion: unknown
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64


How reproducible:
Always

Steps to Reproduce:
1. Login in as admin.
2. Switch to any project.
3. Try to get cluster resources. E.g, oc get pv

Actual results:
$ oc get pv
No resources found in openshift-csi-snapshot-controller namespace.


Expected results:
The error message should be "No resources found" as PV is a cluster resource.

Additional info:

Comment 1 Maciej Szulik 2020-05-04 17:03:03 UTC
This was fixed in https://github.com/kubernetes/kubernetes/pull/89861 and will be brought with the next k8s bump, iow. 1.19. 
So this is 4.6 bug.

Comment 2 Maciej Szulik 2020-05-08 18:14:49 UTC
Should be fixed in https://github.com/openshift/oc/pull/409

Comment 6 zhou ying 2020-05-09 05:31:07 UTC
[root@dhcp-140-138 ~]# oc get storagestates.migration.k8s.io
No resources found
[root@dhcp-140-138 ~]# oc project
Using project "zhouy" on server "https://api.qe-groupd-0509.qe.devcluster.openshift.com:6443".


[root@dhcp-140-138 ~]# oc version 
Client Version: 4.5.0-202005072157-f415627
Server Version: 4.5.0-0.nightly-2020-05-08-200452
Kubernetes Version: v1.18.0-rc.1

Comment 8 errata-xmlrpc 2020-07-13 17:13:54 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, 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/RHBA-2020:2409


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