Bug 1103490
Summary: | [REST API]: Missing VM statistics field. | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Ilanit Stein <istein> |
Component: | ovirt-engine-restapi | Assignee: | Tomas Jelinek <tjelinek> |
Status: | CLOSED ERRATA | QA Contact: | Ilanit Stein <istein> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.5.0 | CC: | adahms, bazulay, eedri, gklein, iheim, juan.hernandez, juwu, mavital, michal.skrivanek, oramraz, rbalakri, Rhev-m-bugs, tjelinek, yeylon |
Target Milestone: | --- | Keywords: | AutomationBlocker, Regression, Triaged |
Target Release: | 3.5.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | virt | ||
Fixed In Version: | ovirt-3.5.0-alpha2 | Doc Type: | Bug Fix |
Doc Text: |
An exception was thrown when the virtual machine statistics was accessed using the REST API, and it was not possible to retrieve the statistics. With this update, users can now access the statistics using the REST API.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-11 18:02:43 UTC | 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1142923, 1156165 |
Description
Ilanit Stein
2014-06-01 13:24:24 UTC
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 |