Change in ovirt-engine[master]: core:Fix NPE when import VM with clone

mlipchuk at redhat.com mlipchuk at redhat.com
Mon Nov 12 16:44:04 UTC 2012


Maor Lipchuk has submitted this change and it was merged.

Change subject: core:Fix NPE when import VM with clone
......................................................................


core:Fix NPE when import VM with clone

The following patch should fix an NPE which occurs when importing a
cloned VM or a cloned VM template, which does not exists in the Data
Center.

This exception is caused when trying to copy each disk, and use
the property WipeAfterDelete from the image in the DB,
since the disk does not exists in the DB, we get an NPE.

The proposed fix is to use getDestinationDiskImage to get the
WipeAfterDelete value, instead use the original image with getImage().

Change-Id: I47b8f82a2bd19320d9953df54f9aa16e4ef9200f
Signed-off-by: Maor Lipchuk <mlipchuk at redhat.com>
Related to Bug-Url: https://bugzilla.redhat.com/862303
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Daniel Erez: Looks good to me, approved
  Maor Lipchuk: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47b8f82a2bd19320d9953df54f9aa16e4ef9200f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>



More information about the Engine-commits mailing list