Bug 1765015

Summary: Resources Tab under Custom Resource details page for installed operator does not list StorageClass
Product: OpenShift Container Platform Reporter: umanga <uchapaga>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: umanga <uchapaga>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---Keywords: Reopened
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:09:02 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:
Attachments:
Description Flags
404 not found under resources none

Description umanga 2019-10-24 07:25:39 UTC
Created attachment 1628739 [details]
404 not found under resources

Description of problem:
Resources Tab under Custom Resource details page for installed operator does not list StorageClass. Instead, it gives a 404 Not Found.

This is because the api request fails.
Request URL: https://console-openshift-console.apps.uchapaga-oct23.devcluster.openshift.com/api/kubernetes/apis/storage.k8s.io/v1/namespaces/openshift-storage/storageclasses?limit=250

We need to use,
https://console-openshift-console.apps.uchapaga-oct23.devcluster.openshift.com/api/kubernetes/apis/storage.k8s.io/v1/storageclasses?limit=250
to make request as StorageClass is not namespaced.

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

How reproducible:
100%

Steps to Reproduce:
1. Deploy operator
2. Create a CustomResource that owns a StorageClass
3. Check the Resource Tab for that CustomResource 

Actual results:
404 Not Found

Expected results:
List of StorageClass owned.

Additional info:

Comment 1 Samuel Padgett 2019-10-24 12:58:44 UTC
It looks like we're not properly handling cluster scoped resources.

Comment 2 Cyril 2019-10-25 17:25:32 UTC
I need help reproducing Bug 1765015. Tried to install OCS but couldn't find it in the Operator Hub.

Comment 3 umanga 2019-10-29 06:27:33 UTC
(In reply to Cyril from comment #2)
> I need help reproducing Bug 1765015. Tried to install OCS but couldn't find
> it in the Operator Hub.

Provided a setup with error reproduced (via private chat).

Comment 4 Samuel Padgett 2019-10-30 19:19:16 UTC
I'm going to duplicate this to bug 1765009. These are different symptoms of the same basic problem.

*** This bug has been marked as a duplicate of bug 1765009 ***

Comment 5 Samuel Padgett 2019-10-31 12:23:39 UTC
Removing as a duplicate since there is an additional fix needed for storage classes to work.

Comment 7 Yadan Pei 2019-11-07 05:51:15 UTC
Umanga, can you help verify the fix? I still can't get a successful OCS operator even using release-4.2 branch.

Thank you for your help

Comment 8 umanga 2019-11-07 06:54:14 UTC
Tested with OCP 4.3.0-0.ci-2019-11-07-022944. I can see the StorageClass getting listed correctly.
Attaching a screenshot and marking this as verified.

Comment 10 Yadan Pei 2019-11-07 08:09:39 UTC
Thank you very much, umanga

Comment 12 errata-xmlrpc 2020-01-23 11:09:02 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:0062