Description of problem: Automatic test on CI fail on GET VM statistics: request content is -- url:/ovirt-engine/api/vms/ac65d66b-18b0-4289-8ba1-3dd0e40e7a1e/statistics 2014-05-29 19:03:41,156 - MainThread - vms - ERROR - Response code is not valid, expected is: [200, 201], actual is: 500 Jenkins job: http://jenkins-ci.eng.lab.tlv.redhat.com/view/0%20Unstable%203.5/job/rhevm_3.5_automation_coretools_two_hosts_restapi_vms_nfs_rest_factory/127/ Version-Release number of selected component (if applicable): rhevm-3.5.0-0.1000.1552.4bf744d.master.el6ev.noarch.rpm How reproducible: 100%
This happens because we don't check if the migration progress value returned by the backend is null, just call the "setDatum" method. Before that call the JVM will try to unbox the value and thus generate a NPE.
Verified on rhevm-3.5, on the same test. last commit (origin/master): 541546ecbbe5d1465c17aea03b8b75ed8b87dfbb http://jenkins-ci.eng.lab.tlv.redhat.com/view/0%20Unstable%203.5/job/rhevm_3.5_automation_coretools_two_hosts_restapi_vms_nfs_rest_factory/380/ 2014-08-06 19:20:11,373 - MainThread - vms - DEBUG - GET request content is -- url:/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics 2014-08-06 19:20:11,641 - MainThread - vms - DEBUG - Response code is valid: [200, 201] 2014-08-06 19:20:11,673 - MainThread - vms - DEBUG - Response body for GET request is: <statistics> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/5a89a1d2-32be-33f7-a0d1-f8b5bc974ff6" id="5a89a1d2-32be-33f7-a0d1-f8b5bc974ff6"> <name>memory.installed</name> <description>Total memory configured</description> <values type="INTEGER"> <value> <datum>1073741824</datum> </value> </values> <type>GAUGE</type> <unit>BYTES</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/b7499508-c1c3-32f0-8174-c1783e57bb08" id="b7499508-c1c3-32f0-8174-c1783e57bb08"> <name>memory.used</name> <description>Memory used (agent)</description> <values type="INTEGER"> <value> <datum>0</datum> </value> </values> <type>GAUGE</type> <unit>BYTES</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/ef802239-b74a-329f-9955-be8fea6b50a4" id="ef802239-b74a-329f-9955-be8fea6b50a4"> <name>cpu.current.guest</name> <description>CPU used by guest</description> <values type="DECIMAL"> <value> <datum>0</datum> </value> </values> <type>GAUGE</type> <unit>PERCENT</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/d849a55f-0049-36f8-ae65-face541473ac" id="d849a55f-0049-36f8-ae65-face541473ac"> <name>cpu.current.hypervisor</name> <description>CPU overhead</description> <values type="DECIMAL"> <value> <datum>0</datum> </value> </values> <type>GAUGE</type> <unit>PERCENT</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/2ec286fe-4bec-32f5-8d63-dba7bed58763" id="2ec286fe-4bec-32f5-8d63-dba7bed58763"> <name>cpu.current.total</name> <description>Total CPU used</description> <values type="DECIMAL"> <value> <datum>0</datum> </value> </values> <type>GAUGE</type> <unit>PERCENT</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> <statistic href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a/statistics/892b69a7-41ca-36b1-9a2e-ae5177ef21bb" id="892b69a7-41ca-36b1-9a2e-ae5177ef21bb"> <name>migration.progress</name> <description>Migration Progress</description> <values type="DECIMAL"> <value> <datum>0</datum> </value> </values> <type>GAUGE</type> <unit>PERCENT</unit> <vm href="/ovirt-engine/api/vms/787f3b91-c0b5-47e0-b14f-f8c01577073a" id="787f3b91-c0b5-47e0-b14f-f8c01577073a"/> </statistic> </statistics> 2014-08-06 19:20:11,675 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for memory.installed: 1073741824.0 2014-08-06 19:20:11,675 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for memory.used: 0.0 2014-08-06 19:20:11,675 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for cpu.current.guest: 0.0 2014-08-06 19:20:11,676 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for cpu.current.hypervisor: 0.0 2014-08-06 19:20:11,676 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for cpu.current.total: 0.0 2014-08-06 19:20:11,676 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - Correct value for migration.progress: 0.0 2014-08-06 19:20:11,677 - MainThread - rhevm_api.tests_lib.low_level.vms - INFO - All 5 statistics appear
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0158.html