Bug 956388 - ResourceProxy does not return live values
Summary: ResourceProxy does not return live values
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: CLI
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: JON 3.2.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 21:02 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
3 users (show)

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


Attachments (Terms of Use)
server.log (649.22 KB, application/octet-stream)
2013-04-24 21:08 UTC, Libor Zoubek
no flags Details

Description Libor Zoubek 2013-04-24 21:02:56 UTC
Description of problem: 


An automated test running on RHQ master build start failing 22nd April.

There are several thinks that are happening:

1. all metrics for Linux platform resource type are disabled by default
2. CLI always shows '?' as a result of live metric value
3. MeasurementDataManager.findLiveData fails with NPE


Version-Release number of selected component (if applicable):
Version: 4.7.0-SNAPSHOT
Build Number: cbfe893



How reproducible: always



Steps to Reproduce:
1. enable "Actual Used Memory" metric (disabled as default - which is bug as well)
2. check ProxyFactory.getResource([platform id]).actualUsedMemory.value

  
Actual results: #2 stil returns '?'


Expected results: #2 returns value (UI shows something, but that is not a live value I guess)


Additional info:

Comment 1 Libor Zoubek 2013-04-24 21:08:17 UTC
Created attachment 739603 [details]
server.log

Comment 2 Charles Crouch 2013-04-24 23:52:43 UTC
Assigning to mazz since he started looking it. If thats not the right person, please reassign.

If the changes are related to the recent updates to findLiveData then we really need to review the test coverage for that change.

Comment 3 Charles Crouch 2013-04-24 23:54:10 UTC
Assigning to JON32 to make sure this doesn't escape into the product.

Comment 4 John Mazzitelli 2013-04-25 14:23:39 UTC
git commit to master 9159de1

autoboxing strikes again.

I changed the API to allow for the timeout to be a Long - this allows callers to specify a timeout OR pass in null to accept the default timeout.

As for the metrics all being disabled, I do not see that. My metrics were all enabled as expected. Double check your test scenario/setup to see if you aren't disabling them somewhere else.

If you DO see metrics disabled immediately after committing the platform to inventory, write up a separate BZ. This BZ will be for the NPE in getting the live data, which should now be fixed.

Comment 5 John Mazzitelli 2013-04-25 14:40:46 UTC
git commit to master 06071e1

forgot to commit this test class that implements the new API

Comment 6 John Mazzitelli 2013-04-25 14:50:06 UTC
tested on my local master build and all works now.

(again, FWIW, I just commited a platform after a clean build with empty DB - once the platform went into inventory and went green, the metric schedules were enabled as expected)

Comment 7 Libor Zoubek 2013-04-26 14:44:35 UTC
verified on 4.7.0-SNAPSHOT (2f656dc)


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