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:
Created attachment 739603 [details] server.log
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.
Assigning to JON32 to make sure this doesn't escape into the product.
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.
git commit to master 06071e1 forgot to commit this test class that implements the new API
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)
verified on 4.7.0-SNAPSHOT (2f656dc)