Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1113687

Summary: NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnabled is null
Product: Red Hat Enterprise Virtualization Manager Reporter: Alissa <abonas>
Component: ovirt-engine-restapiAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5.0CC: bazulay, gklein, iheim, mavital, oramraz, rbalakri, Rhev-m-bugs, tjelinek, yeylon
Target Milestone: ---Keywords: Regression
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: vt1.3 Doc Type: Bug Fix
Doc Text:
Cause: Exception when updating a VM using REST API when the balloon is no passed Consequence: User was not able to update a VM using REST API without passing the balloon Fix: fixed Result: Now the user is able to update a VM using REST API also without specifying the balloon
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 08:26:03 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:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    

Description Alissa 2014-06-26 16:06:17 UTC
Description of problem:
NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnabled is null.
Probably related to
http://gerrit.ovirt.org/#/c/22055/

It reproduces when calling updateVm via REST api, and when balloonEnabled is not initialized (not passed), so it remains null. Either a validation is missing, or a default value for that property in the backend.

The cause of this exception is that in VmManagementParametersBase the balloonEnabled property was changed from boolean to Boolean.
Hence, since it's an object and not a primitive, it has now 3 states: null, true, false.
When it is null, passing it to checkPciAndIdeLimit method that accepts boolean causes autoboxing, and autoboxing on null produces NullPointerException.


It influences rbovirt tests that crash because they get 500 server error from ovirt. But it can of course influence more scenarios as well.

relevant stacktrace:
2014-06-26 18:55:39,053 ERROR [org.ovirt.engine.core.bll.UpdateVmCommand] (http--0.0.0.0-8080-5) [133c7f7] Error during CanDoActionFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.UpdateVmCommand.isValidPciAndIdeLimit(UpdateVmCommand.java:562) [bll.jar:]
	at org.ovirt.engine.core.bll.UpdateVmCommand.canDoAction(UpdateVmCommand.java:437) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:724) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:324) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:426) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:405) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:363) [bll.jar:]

Comment 1 Itamar Heim 2014-06-26 19:57:14 UTC
raising priority assuming its a regression.

Comment 3 Tomas Jelinek 2014-06-30 08:18:43 UTC
Please note that this did not get to 3.4 branch since the regression has been introduced by http://gerrit.ovirt.org/#/c/22055/ and it's 3.4 backport http://gerrit.ovirt.org/#/c/25049/ is still review progress.

Comment 4 Michal Skrivanek 2014-06-30 08:21:44 UTC
confirmed with Alissa the original test was on master, no 3.4 backport needed

Comment 5 Lukas Svaty 2014-08-12 08:36:22 UTC
verified in ovirt-rc1

Comment 6 Omer Frenkel 2015-02-17 08:26:03 UTC
RHEV-M 3.5.0 has been released