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 - NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnabled is null
Summary: NullPointerException during canDoAction of UpdateVmCommand when isBalloonEnab...
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Tomas Jelinek
QA Contact: Lukas Svaty
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:
Last Closed: 2015-02-17 08:26:03 UTC
oVirt Team: ---
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 29353 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

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-- [133c7f7] Error during CanDoActionFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.UpdateVmCommand.isValidPciAndIdeLimit( [bll.jar:]
	at org.ovirt.engine.core.bll.UpdateVmCommand.canDoAction( [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction( [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.executeAction( [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction( [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runActionImpl( [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction( [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 and it's 3.4 backport 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.