Bug 1547050 - NPE while asking for host statistics
Summary: NPE while asking for host statistics
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.2.1.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ondra Machacek
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-20 12:29 UTC by Tomas Jelinek
Modified: 2018-03-29 11:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-29 11:08:47 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
engine logs (18.70 KB, text/plain)
2018-02-20 12:29 UTC, Tomas Jelinek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 88064 0 master MERGED restapi: fix hugepages NPE statiscal query 2018-02-26 14:35:29 UTC
oVirt gerrit 88200 0 ovirt-engine-4.2 MERGED restapi: fix hugepages NPE statiscal query 2018-02-27 11:08:29 UTC

Description Tomas Jelinek 2018-02-20 12:29:55 UTC
Created attachment 1398217 [details]
engine logs

Description of problem:
while calling:
curl -k -X GET -u "admin@internal:<password>" -H "Content-type: application/xml" -H "Accept: application/xml" https://<host>/ovirt-engine/api/hosts?follow=statistics

I get as a result an internal server error. In engine log I see this:
2018-02-20 13:17:36,288+01 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-113) [] Operation Failed: null
2018-02-20 13:17:36,288+01 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-113) [] Exception: java.lang.NullPointerException
	at org.ovirt.engine.api.restapi.resource.HostStatisticalQuery.getStatistics(HostStatisticalQuery.java:63) [restapi-jaxrs.jar:]
	at org.ovirt.engine.api.restapi.resource.HostStatisticalQuery.getStatistics(HostStatisticalQuery.java:13) [restapi-jaxrs.jar:]
	at org.ovirt.engine.api.restapi.resource.BackendStatisticsResource.list(BackendStatisticsResource.java:44) [restapi-jaxrs.jar:]


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.2-0.0.master.20180108193417.git45b0275.el7.centos.noarch

Additional info:
It did work on my local setup so it must be something specific with the setup.

Comment 2 Filip Krepinsky 2018-02-20 15:37:50 UTC
btw it is happening because of this host ob brq-dev: 

https://brq-dev.rhev.lab.eng.brq.redhat.com/ovirt-engine/api/hosts/68c74cda-6580-474e-afd8-a34e23749cb1?follow=statistics

Comment 3 Radim Hrazdil 2018-03-07 08:53:40 UTC
Verified that using the API request in the description doesn't lead to Nullpointer Exception.

Software Version:4.2.2.2-0.1.el7

Comment 4 Sandro Bonazzola 2018-03-29 11:08:47 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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