Bug 894319

Summary: Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard
Product: [JBoss] JBoss Operations Network Reporter: Sunil Kondkar <skondkar>
Component: UIAssignee: Mike Thompson <mithomps>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: JON 3.1.2CC: jkremser, loleary, mithomps, myarboro, spinder
Target Milestone: CR03   
Target Release: JON 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 895664 (view as bug list) Environment:
Last Closed: 2013-09-11 11:04:35 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:
Bug Depends On: 852837    
Bug Blocks: 895664    
Attachments:
Description Flags
Screenshot
none
Error_details none

Description Sunil Kondkar 2013-01-11 12:20:46 UTC
Description of problem:

Added 'Resource Metric Graph' portlet to the dashboard, selected and saved a resource and metric for the portlet and navigated to platform or any resource in inventory. It displays Globally uncaught exception in UI after clicking the resource in inventory.

Please refer the screenshot and attachment for the error details as displayed in message center. 

No errors in server/agent logs.

Tried deleting the portlet from dashboard and again navigating to a resource in inventory. It still shows the exception.

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

JON Version: JON 3.1.2.CR2
Build Number: 74de575:bca49e0

Browsers: Firefox 10, IE8 and IE9

Database: Postgres 8.4.2


How reproducible:

Always

Steps to Reproduce:

1. Login to JON
2. Navigate to Dashboard menu
3. Click on 'New Dashboard' button or 'Edit Mode' for default dashboard.
4. Add portlet 'Resource Metric Graph'
5. Click on icon for setting in the 'Resource Metric Graph' portlet.
6. Select any resource ( Ex: RHQ Agent )
7. Select any metric ( Ex: Total number of commands received per minute )
8. Click on 'Save' button.
9. Navigate to 'Inventory' menu.
10. Click on 'Resources->Platforms'
11. Click on the platform resource.
12. It displays 'Globally uncaught exception'
  
Actual results:

Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard.

Expected results:

Exception should not be displayed.

Additional info:

1. The exception also occurs after adding 'Resource Group Metric Graph' portlet to dashboard. ( Add the portlet to dashboard,  select and save a resource and metric for the portlet and navigate to platform or any other resource in inventory.)

2. The exception does not occur in JON 3.1.1 GA build.

Comment 1 Sunil Kondkar 2013-01-11 12:23:47 UTC
Created attachment 676836 [details]
Screenshot

Comment 2 Sunil Kondkar 2013-01-11 12:24:36 UTC
Created attachment 676837 [details]
Error_details

Comment 6 Mike Thompson 2013-01-11 19:59:06 UTC
I have characterized this a bit more...

This bug occurs when you move from Dashboard to Inventory Detail view only if the dashboard contains Resource Metric Graphs that are configured (with metrics).

And the workaround is to refresh the page. The application is stable until the above condition is met again.

Comment 7 Mike Thompson 2013-01-11 23:41:04 UTC
In effort to narrow down the offending commit from 3.1.1 to 3.1.2. I have found that the commit b9d4a5f introduces a new version of gflot (along with jquery, excanvas and sparklines). Consistent with the above behavior described, when you visit a gflot screen and then try to goto a screen with sparklines the erroneous behavior occurs.

I was clued into this because the bug was stateful and not consistent. It takes a view of the Dashboard with a populated Resource Metric Graph to setup the condition for sparkline graphs to error out.

If I take 3.1.2 CR1 and revert the above commit everything is fine (without the functionality that the commit fixes).

Comment 8 Sunil Kondkar 2013-01-14 12:47:47 UTC
Additional Info:

This issue also exists in resource level dashboard and compatible group dashboard.

( Resource/Group->Summary->activity->Edit Mode->Add Resource Metric Graph portlet->select and save a resource and metric for the portlet and navigate to platform or any other resource in inventory.)

Comment 9 Jirka Kremser 2013-01-14 15:05:47 UTC
This bug is related to bug 852837.

Comment 14 Mike Foley 2013-01-14 20:16:12 UTC
per BZ triage, the fix for this will be targetted in JON 3.1.2 CR3

Comment 15 Mike Thompson 2013-01-14 22:17:16 UTC
By backing out BZ 852837 with 2 commits b9d4a5f and 8000e71 this problem no longer occurs. BZ 852837 creates this problem so by backing it out this BZ never occurs.

Just needs to be verified with QE that the problem no longer occurs.

Comment 18 Jirka Kremser 2013-01-15 18:49:07 UTC
I've re-reverted the commits d069824b5 and 037e48a28 and pushed commit 8c1226a9b that solve both bugs. I was jQuery conflict (again). We should get rid of Gflot in the future.

fixed in release/jon3.1.x
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=8c1226a9b

time:    Tue Jan 15 19:40:05 2013 +0100
commit:  8c1226a9b2bd3829f667b8cb1618ad9e6ce1ff37
author:  Jirka Kremser - jkremser
message: [BZ 894319 - Globally uncaught exception on navigating a resource after adding 'Resource Metric Graph' portlet to dashboard] Gflot now doesn't use its own version of jQuery. This bug was caused by the fact that Gflot lazily loads the jQuery to the page, so if user visited the dashboard before the page when Sparkline is used (resource summary tab), the exception was thrown.     (cherry-picked from 5adfb817554307a6615e25cb6f952e1c1e9025bd, BZ 895664)

Comment 19 Simeon Pinder 2013-01-16 14:10:39 UTC
Moving this to ON_QA since available for test in ER3.

Comment 20 Mike Foley 2013-01-16 15:02:34 UTC
VERIFIED in JON 3.1.2

Comment 21 Sunil Kondkar 2013-01-16 15:23:19 UTC
Verified on JON 3.1.2 CR3 build.

Verified on main dashboard, resource level and compatible group level ..verified on Firefox 10, IE8 and IE9. The exception does not exist.