Bug 1113687 - NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnabled is null
Summary: NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnab...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.5.0
Assignee: Tomas Jelinek
QA Contact: Lukas Svaty
URL:
Whiteboard: virt
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-06-26 16:06 UTC by Alissa
Modified: 2015-02-17 08:26 UTC (History)
9 users (show)

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
Clone Of:
Environment:
Last Closed: 2015-02-17 08:26:03 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 29353 0 None None None Never

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


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