Bug 1035280 - Cannot load metrics for platform resource created using rest api
Summary: Cannot load metrics for platform resource created using rest api
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring -- Other, REST
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR01
: JON 3.2.0
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1012435
TreeView+ depends on / blocked
 
Reported: 2013-11-27 12:51 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2013-11-27 12:51:46 UTC
Description of problem:


Version-Release number of selected component (if applicable):
JON 3.2.0.ER7

How reproducible: always


Steps to Reproduce:
1. create platform via rest api

2. go to UI and navigate on it's monitoring->metrics

Actual results:

UI raises error "Cannot load metrics"

You may have mistyped the address or the page may have moved.

Detail :	
java.lang.RuntimeException:[1385546369652] javax.ejb.EJBException:java.lang.reflect.UndeclaredThrowableException -> java.lang.reflect.UndeclaredThrowableException:null -> org.jboss.remoting.transport.http.WebServerError:<!DOCTYPE html><html><head>  <title>The page you were looking for doesn't exist (404)</title>  <style type="text/css">    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }    div.dialog {      width: 25em;      padding: 0 4em;      margin: 4em auto 0 auto;      border: 1px solid #ccc;      border-right-color: #999;      border-bottom-color: #999;    }    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }  </style></head><body>  <!-- This file lives in public/404.html -->  <div class="dialog">    <h1>The page you were looking for doesn't exist.</h1>    <p>You may have mistyped the address or the page may have moved.</p>  </div></body></html>

Expected results:

No error is raised and (in this case) NaN values are shown.

Additional info: I can succesfully browse metric data via REST API.

Comment 1 Libor Zoubek 2013-11-27 12:57:14 UTC
to create platform via rest api run:

curl -u rhqadmin:rhqadmin --data '{"resourceName":"test-platform","typeName":"Linux"}' http://${RHQ_HOST}:7080/rest/resource/platforms -H 'Content-Type: application/json'

Comment 2 Mike Foley 2013-11-27 13:46:46 UTC
REST API is out of tech preview ... there is a PRD requirement here.  This is blocking for that PRD requirement.  Adding the blocks GA flag.


of course, this also needs to be triaged by the triage team for inclusion...as the fix may affect schedule.

Comment 3 Jirka Kremser 2013-11-27 16:07:06 UTC
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=94e2c0431
time:    2013-11-27 17:02:56 +0100
commit:  94e2c04316352993550b4837bd27aadacfffdbb2
author:  Jirka Kremser - jkremser
message: [BZ 1035280] - Cannot load metrics for platform resource created using
         rest api - adding a check whether the agent is the dummy one
         for MeasurementDataManagerBean.findLiveData() and
         ResourceManagerBean.getLiveAvailability().

Comment 4 Jirka Kremser 2013-11-27 16:47:50 UTC
ade3c186a801dc897f0d2e9fd648d1d9c245b0dd in the release/jon3.2.x branch

Comment 5 Jirka Kremser 2013-11-29 11:56:01 UTC
same stuff for groups:

branch:  release/jon3.2.x
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=6f6ab84ee
time:    2013-11-29 12:53:06 +0100
commit:  6f6ab84ee7ed815fd450df877a13aa533a49d8c7
author:  Jirka Kremser - jkremser
message: [BZ 1035280] - Cannot load metrics for platform resource created using
         rest api - check for dummy agent in
         MeasurementDataManagerBean.findLiveDataForGroup()

Comment 6 Simeon Pinder 2013-12-03 23:19:26 UTC
Moving to ON_QA for testing in latest(CR1) brew build.

Comment 7 Libor Zoubek 2013-12-04 10:17:17 UTC
verified on CR1


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