Change in ovirt-engine[master]: core: fix AddVmParameters for null diskInfoList

ofrenkel at redhat.com ofrenkel at redhat.com
Wed Sep 24 10:39:20 UTC 2014


Omer Frenkel has submitted this change and it was merged.

Change subject: core: fix AddVmParameters for null diskInfoList
......................................................................


core: fix AddVmParameters for null diskInfoList

In change I06f2de3db1b0559af4df04d0d158b10b8460c684:

 b7804ad core: cleanup AddVmParameters constructors

the logic in charge to ensure that diskInfoList is never null was
removed.

When a new VM is added from rest-api addVmFromScratch(...) sets
diskInfoList to a null value:

  AddVmParameters params = new AddVmParameters(staticVm);
  params.setDiskInfoList(mapDisks(vm.getDisks()));

resulting in a NPE:

 ERROR [AddVmFromScratchCommand] Error during CanDoActionFailure:
         java.lang.NullPointerException
   at checkImagesConfiguration(ImagesHandler.java:455) [bll.jar:]
   at canDoAction(AddVmFromScratchCommand.java:150) [bll.jar:]
   at internalCanDoAction(CommandBase.java:746) [bll.jar:]

Change-Id: I979bd6373e4a1440f88d27e416bd2e116b010891
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVmParameters.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Federico Simoncelli: Verified
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/33294
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I979bd6373e4a1440f88d27e416bd2e116b010891
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list