Bug 956388

Summary: ResourceProxy does not return live values
Product: [JBoss] JBoss Operations Network Reporter: Libor Zoubek <lzoubek>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: JON 3.2CC: hrupp, mazz, theute
Target Milestone: ---   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Attachments:
Description Flags
server.log none

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)