Bug 1769317 - Dashboard freezes if a non existing model is requested by some card
Summary: Dashboard freezes if a non existing model is requested by some card
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.4.0
Assignee: Rastislav Wagner
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1775755
TreeView+ depends on / blocked
 
Reported: 2019-11-06 11:34 UTC by Rastislav Wagner
Modified: 2020-05-13 21:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Plugin may request a k8s model which is not available in cluster. Consequence: Dashboard page freezes. Fix: Filter plugins based on availability of requested model. Result: Dashboard wont freeze anymore
Clone Of:
: 1775755 (view as bug list)
Environment:
Last Closed: 2020-05-13 21:52:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 3374 0 'None' closed Bug 1769317: Mark all resources as optional to always render card by firehose 2020-05-04 06:30:44 UTC
Github openshift console pull 3549 0 'None' closed Revert "Bug 1769317: Mark all resources as optional to always render card by firehose" 2020-05-04 06:30:44 UTC
Github openshift console pull 3573 0 'None' closed Bug 1769317: Mark all resources as optional to always render card by firehose 2020-05-04 06:30:44 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-13 21:52:20 UTC

Description Rastislav Wagner 2019-11-06 11:34:36 UTC
We are using Firehose to watch resources See https://github.com/openshift/console/blob/master/frontend/public/components/dashboard/with-dashboard-resources.tsx#L161 . Every card is wrapped in withDashboardResources HOC which injects functions to watch URL, Prometheus and k8s resource. A card will use useEffect hook to call watchK8sResource(requested_resource) which will update withDashboardResources's state and updates Firehose's resources prop.

 

The problem is that if the component is watching only resource(s) which do not exist in the cluster (like ClusterVersion CRD on non-OpenShift) the Firehose will render null https://github.com/openshift/console/blob/master/frontend/public/components/utils/firehose.jsx#L245 which in turn will call Card's useEffect cleanup function which calls stopWatchK8sResources(requested_resource) - this will update withDashboardResources's state and Firehose's resources prop is set to empty array - Firehose will now render the Card (as every resource is loaded) and now the loop starts - Card is rendered and useEffect is called again - we are at the beginning.

Comment 2 Samuel Padgett 2019-11-22 21:31:57 UTC
Moving back to assigned because this fix broke the image security plugin.

Comment 5 Yadan Pei 2019-12-18 08:02:01 UTC
Since I don't see any of the symptoms of the bug description, also the fix doesn't block image security plugin now.

Moving to VERIFIED 4.4.0-0.nightly-2019-12-16-124946

Comment 7 errata-xmlrpc 2020-05-13 21:52:18 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:0581


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