This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 790076

Summary: Error viewing live data in the resource metric graph portlet
Product: [Other] RHQ Project Reporter: Charles Crouch <ccrouch>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2CC: hbrock, hrupp, jshaughn, lkrejci, skondkar, spinder
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 759485 Environment:
Last Closed: 2013-09-03 11:11:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 759485    
Bug Blocks: 752488    

Description Charles Crouch 2012-02-13 10:47:49 EST
+++ This bug was initially created as a clone of Bug #759485 +++

Description of problem:
When clicking on live data icon of the resource metric graph portlet, there's a uncaught global exception in the GUI (with no server-side counterpart).

java.util.NoSuchElementException:null
--- STACK TRACE FOLLOWS ---
null
   at Unknown.java_util_NoSuchElementException_$NoSuchElementException__Ljava_util_NoSuchElementException_2Ljava_util_NoSuchElementException_2(Unknown source:0)
   at Unknown.java_util_AbstractList$IteratorImpl_$next__Ljava_util_AbstractList$IteratorImpl_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.java_util_AbstractHashMap$EntrySetIterator_next__Ljava_lang_Object_2(Unknown source:0)
   at Unknown.java_util_AbstractMap$1$1_next__Ljava_lang_Object_2(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_2Ljava_util_Set_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_LiveGraphView$4$1_onSuccess__Ljava_lang_Object_2V(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)


Version-Release number of selected component (if applicable):
4.2.0.JON300.CR5

How reproducible:
always

Steps to Reproduce:
1. Add the "resource metric graph" portlet to dashboard (either global or resource specific)
2. Click on the live data icon in the top-right corner.
  
Actual results:
uncaught exception in the message center

Expected results:
no exceptions

Additional info:

--- Additional comment from jshaughn@redhat.com on 2011-12-02 13:32:24 EST ---


The problem is maybe two-fold.  The exception results from not protecting
against an empty metric value return.  I will fix this.  The second
problem is that there really shouldn't be an empty value returned.

Interestingly, Lukas was just "lucky" in that the graphing actually
seems to work for all resource types other than the one he used: CPU.
At least all the ones I tried until I asked him what he used :)

So, with the fix for problem 1 the graph does not generate an exception
but it also does not display any data.  I'll look at seeing if 
CpuComponent can be tweaked to provide something for a live data
request.  The issue is due to the fact that we already do some
complex work to generate CPU metrics.

--- Additional comment from jshaughn@redhat.com on 2011-12-02 14:02:41 EST ---

master commit 69e2b1d81dc42b0bfc12ee8e32b08d7b2beba38d

- Fixed the live graph code to throw out metric requests returning no values
  so we should be safe from the type of exception reported.
- Fixed CpuComponent to return valid data on a live metric request, instead
  of null, so CPU resources should now give proper live graphs.

--- Additional comment from mfoley@redhat.com on 2011-12-12 11:53:35 EST ---

verified RHQ 3 master branch
Comment 1 Jay Shaughnessy 2012-02-13 13:59:57 EST
Cherry-pick from master:

release/jon3.0.x commit: 34653b7a47a6f3aaea2485928d5f31e0c17f2a94
Comment 2 Simeon Pinder 2012-02-17 00:34:14 EST
Moving to ON_QA for testing with JON 3.0.1.GA RC5 or better:
https://brewweb.devel.redhat.com//buildinfo?buildID=199114
Comment 3 Sunil Kondkar 2012-02-17 06:42:40 EST
Verified on JON 3.0.1.GA RC5 (Build Number: dd8a001:fbca611)

Verified for global and resource specific "resource metric graph" portlet. Clicking on live data icon displays live graphs.
Comment 4 Heiko W. Rupp 2013-09-03 11:11:45 EDT
Bulk closing of old issues in VERIFIED state.