Bug 920986

Summary: Empty vds statistics may end up causing NPE
Product: Red Hat Enterprise Virtualization Manager Reporter: Doron Fediuck <dfediuck>
Component: ovirt-engineAssignee: Gilad Chaplik <gchaplik>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Begun <ibegun>
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.2.0CC: acathrow, dfediuck, dyasny, iheim, lpeer, oramraz, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: sf11 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: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 948448    

Description Doron Fediuck 2013-03-13 09:10:03 UTC
Description of problem:
It seems that when the usage statistics of a VDS in the DB is empty (null),
a memory threashold check will cause NPE. The path to this DB situation is still being checked, but the NPE should be prevented.

Additional info:

 [org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo]
 (DefaultQuartzScheduler_Worker-2) [617e62bb]
 NullPointerException:
 :
 java.lang.NullPointerException
         at org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.checkVdsMemoryThreshold(VdsUpdateRunTimeInfo.java:276)
         [vdsbroker.jar:]
         at org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.saveDataToDb(VdsUpdateRunTimeInfo.java:123)
         [vdsbroker.jar:]
         at org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.Refresh(VdsUpdateRunTimeInfo.java:391)
         [vdsbroker.jar:]
         at org.ovirt.engine.core.vdsbroker.VdsManager.OnTimer(VdsManager.java:234)

Comment 5 Ido Begun 2013-04-25 14:58:07 UTC
OK - SF13.1

No NPE is throw when crossing the memory threshold. Instead, in audit log:
"Available memory of host xx.xx.x.xx [x MB] is under defined threshold [1024 MB]."

Comment 6 Itamar Heim 2013-06-11 08:32:09 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 08:32:10 UTC
3.2 has been released

Comment 8 Itamar Heim 2013-06-11 08:33:21 UTC
3.2 has been released