Bug 1383329 - Snapshot restore fails with NPE
Summary: Snapshot restore fails with NPE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Idan Shaby
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-10 12:30 UTC by Roman Hodain
Modified: 2019-11-14 09:05 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-25 00:57:08 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:0997 0 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.1 GA 2017-04-18 20:11:26 UTC

Description Roman Hodain 2016-10-10 12:30:41 UTC
Description of problem:
    When restoring VM snapshot with previewed disks which are not part of the snapshot. The restore fails.

Version-Release number of selected component (if applicable):
RHEVM 3.6.9

How reproducible:
90%

Steps to Reproduce:
1.Create a VM with two thin provisioned disks
2.Create a snapshot
3.Create two additional disks 
4. Preview the snapshot with option:
         Include in the previewed VM all disks (keep the disks that are not included in the snapshot as-is).
5. Commit the preview

Actual results:
2016-10-10 13:31:25,233 ERROR [org.ovirt.engine.core.bll.RestoreFromSnapshotCommand] (ajp-/127.0.0.1:8702-7) [19e5e813] Exception: java.lang.NullPointerException
    at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.removeOtherImageAndParents(RestoreFromSnapshotCommand.java:84) [bll.jar:]
    at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.removeImages(RestoreFromSnapshotCommand.java:55) [bll.jar:]
    at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.executeCommand(RestoreFromSnapshotCommand.java:40) [bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1218) [bll.jar:]


Expected results:
The preview is successfully committed.

Additional info:

The test was done on VM called "Test" (13556c5a-d35e-44a0-9773-bc3ce4870e5f)

Comment 3 Idan Shaby 2016-12-26 14:07:03 UTC
Hi Roman,

Did this bug happened again since you opened it?
I can not reproduce it on master nor on ovirt-engine-3.6.

Comment 4 Roman Hodain 2017-01-10 11:51:29 UTC
(In reply to Idan Shaby from comment #3)
> Hi Roman,
> 
> Did this bug happened again since you opened it?
> I can not reproduce it on master nor on ovirt-engine-3.6.

Hi,

yes I have just reproduced the issue in my environment with the latest 3.6 RHEV-M.I was not able to reproduce the first time, but I got this issue the second time. I suppose there is some timing issue.

Comment 5 Idan Shaby 2017-01-16 14:53:22 UTC
The disk snapshot mechanism had some major changes in 4.1 (see https://gerrit.ovirt.org/#/c/68536/ ).
I've tried to reproduce the bug but the issue does not occur in 4.1.

Comment 9 Elad 2017-01-23 09:59:51 UTC
Tested according to the steps in the description:
1.Create a VM with two thin provisioned disks
2.Create a snapshot
3.Create two additional disks 
4. Preview the snapshot with option:
         Include in the previewed VM all disks (keep the disks that are not included in the snapshot as-is).
5. Commit the preview


Snapshot restore succeeded
Tested using:
ovirt-engine-4.1.0-0.4.master.20170117182028.git4678f8c.el7.centos.noarch
vdsm-4.19.2-1.el7.centos.x86_64


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