Bug 1906118

Summary: OCS feature detection constantly polls storageclusters and storageclasses
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Console Storage PluginAssignee: Bipul Adhikari <badhikar>
Status: CLOSED ERRATA QA Contact: Samuel Padgett <spadgett>
Severity: high Docs Contact:
Priority: high    
Version: 4.7CC: aos-bugs, badhikar, ebenahar, nberry, nthomas
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Version: 4.7.0-0.nightly-2020-12-09-093341 Cluster ID: 26d5027f-cd2e-463d-aca8-408cd3f36335 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:83.0) Gecko/20100101 Firefox/83.0
Last Closed: 2021-02-24 15:41:51 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:
Attachments:
Description Flags
StorageClass polling none

Description Samuel Padgett 2020-12-09 17:23:33 UTC
The OCS feature detection requests storageclusters and storageclasses over and over again. It looks like there are runtime errors in the feature detectors that cause OCS to retry.

Inspecting the code, I see some issues here: https://github.com/spadgett/console/blob/203c628101349eeaaf140ec3e7c36018af054784/frontend/packages/ceph-storage-plugin/src/features.ts#L73-L91

For instance, this line will be a runtime error if the storagecluster is not found:

    const isInternal = _.isEmpty(storageCluster.spec.externalStorage);

It appears that any status code other than 404 will result in a retry. So if we get a 403 for instance, it will keep retrying even though the user doesn't have permission.

I suspect there are similar problem in `detectRGW` causing storageclasses to be requested over and over again.

Comment 1 Ankush Behl 2020-12-10 05:51:13 UTC
@badhikar@redhat.com can you look into this.

Comment 5 Samuel Padgett 2021-01-12 14:58:55 UTC
Created attachment 1746673 [details]
StorageClass polling

I'm still seeing StorageClass polling after the fix.

Comment 8 Elad 2021-02-04 09:15:04 UTC
Hi Samuel, I moved the QA contact to you. Please let us know in case it is not OK. Thanks

Comment 9 Samuel Padgett 2021-02-09 20:28:33 UTC
Verified on 4.7.0-rc.0. OCS no longer constantly polls storageclusters or storageclasses when not enabled.

Comment 11 errata-xmlrpc 2021-02-24 15:41:51 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