Bug 1713967

Summary: [UI] - Couldn't fetch dashboard data - dashboard is blank
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: Frontend.WebAdminAssignee: Kaustav Majumder <kmajumde>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.4.1CC: bugs, gshereme, hunter86_bg, lleistne, michal.skrivanek, rbarry, rduda, rik.theys, sgratch, sradco
Target Milestone: ovirt-4.3.4Keywords: Regression
Target Release: ---Flags: pm-rhel: ovirt-4.3+
michal.skrivanek: blocker?
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 4.3.4-5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-11 06:24:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1656683    
Bug Blocks:    
Attachments:
Description Flags
screenshot none

Description Michael Burman 2019-05-26 08:59:00 UTC
Description of problem:
[UI] - Couldn't fetch dashboard date - dashboard is blank

On latest 4.3.4-1 the dashboard is broken

Version-Release number of selected component (if applicable):
4.3.4.1-0.1.el7

How reproducible:
100%

Steps to Reproduce:
1. Upgrade to latest 4.3.4.1-0.1

Actual results:
dashboard is broken

Expected results:
dashboard is working

Comment 1 Michael Burman 2019-05-26 18:32:58 UTC
Created attachment 1573703 [details]
screenshot

Comment 2 Michal Skrivanek 2019-05-27 06:39:53 UTC
logs?

Comment 3 Michael Burman 2019-05-27 06:48:50 UTC
(In reply to Michal Skrivanek from comment #2)
> logs?

Hi Michal, which logs will help? the issue is pretty strait forward. Have a 4.3.4.1-0.1 engine and press the dash board.

Comment 4 Michal Skrivanek 2019-05-27 07:02:08 UTC
it's good that it's straightforward, but noone will get to install it for few days. logs always help. 
sosreport from the engine would be good

Comment 8 Michal Skrivanek 2019-05-27 12:25:51 UTC
it needs to be clarified(the exact steps of upgrade/sosreport) and reproduced in a clean environment

Comment 9 Michael Burman 2019-05-27 13:34:49 UTC
(In reply to Michal Skrivanek from comment #8)
> it needs to be clarified(the exact steps of upgrade/sosreport) and
> reproduced in a clean environment

Clean + upgrade

Comment 10 Sharon Gratch 2019-05-28 10:24:44 UTC
Michael, can you please also attach ovirt-engine-dwhd logs?

Comment 13 Greg Sheremeta 2019-05-28 12:29:20 UTC
Can you provide a copy and paste from the browser console? It would help to see the JavaScript error.

Comment 16 Greg Sheremeta 2019-05-28 13:17:18 UTC
Indeed it is https://gerrit.ovirt.org/#/c/98545/

DataProvider.js:35 DataProvider failed to fetch data TypeError: Cannot read property 'forEach' of undefined
at DashboardDataProvider.js:80
at Array.forEach (<anonymous>)
at i (DashboardDataProvider.js:76)


line 80:
    heatMapData.forEach(obj => {
      obj.value = obj.value / 100
    })


I suspect heatMapData is undefined for 'vdoSavings' sometimes.

Comment 17 Scott Dickerson 2019-05-28 14:47:03 UTC
(In reply to Greg Sheremeta from comment #16)
> Indeed it is https://gerrit.ovirt.org/#/c/98545/
> 
> DataProvider.js:35 DataProvider failed to fetch data TypeError: Cannot read
> property 'forEach' of undefined
> at DashboardDataProvider.js:80
> at Array.forEach (<anonymous>)
> at i (DashboardDataProvider.js:76)
> 

The patch that adds 'vdoSavings' [1] wasn't back-ported to 4.3. See BZ1656683.  With [2] in dashboard, the way the dashboard DataProvider post processes data from the dashboard service does not include a check to make sure each data element exists. So as it is trying to process 'vdoSavings' data, the data key doesn't exist and we see the error above.

I recommend two quick followups.  First, I can add some existence checking to the dashboard data post processor so data that is missing won't cause the entire process to fail.  This will allow dashboard to function but will leave any components/charts that rely on missing data to either not render or render empty.  Second, the patch [2] should be back-ported to the appropriate 4.3 branch.

[1] https://gerrit.ovirt.org/#/c/96830/
[2] https://gerrit.ovirt.org/#/c/98545/

Comment 19 Strahil Nikolov 2019-05-28 15:36:59 UTC
Hm... I have several VDOs and the logic points me that my DWH should have the necessary data in order to visualize everything needed.
Does this bug only affect engines with VDOs ?

Comment 20 Scott Dickerson 2019-05-28 18:19:38 UTC
(In reply to Strahil Nikolov from comment #19)
> Hm... I have several VDOs and the logic points me that my DWH should have
> the necessary data in order to visualize everything needed.
> Does this bug only affect engines with VDOs ?

No, this bug effects all engines.

BZ1656683 needed to be backported (which is already nearly done: https://gerrit.ovirt.org/100375) for the current ui-extensions / dashboard code to render properly.

https://gerrit.ovirt.org/#/c/100380/ enhances the dashboard code itself to handle if data is missing when fetched from the engine.

Comment 21 Strahil Nikolov 2019-05-28 18:46:40 UTC
You can ping me , if you need further testing.

Comment 22 Petr Matyáš 2019-06-04 08:34:52 UTC
Verified on ovirt-engine-4.3.4.2-0.1.el7.noarch with ovirt-engine-webadmin-portal-4.3.4.2-0.1.el7.noarch

Comment 23 Sandro Bonazzola 2019-06-11 06:24:03 UTC
This bugzilla is included in oVirt 4.3.4 release, published on June 11th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.