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 1506092 - Disks and interfaces don't appear in VM's snapshots
Summary: Disks and interfaces don't appear in VM's snapshots
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: x86_64
OS: Linux
urgent
urgent vote
Target Milestone: ovirt-4.2.0
: ---
Assignee: Maor
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-25 06:03 UTC by Michael Burman
Modified: 2017-12-20 11:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:20:04 UTC
oVirt Team: Storage
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine log (deleted)
2017-10-25 06:07 UTC, Michael Burman
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 83172 master MERGED core: Use FullEntityOvfData for attribute reference 2017-10-25 19:39:21 UTC

Description Michael Burman 2017-10-25 06:03:54 UTC
Description of problem:
Snapshot preview removes VM's origin disks.

After performing a snapshot preview, the VM's origin disks are gone

Version-Release number of selected component (if applicable):
4.2.0-0.0.master.20171024223752.gite85d7f2.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Create snapshot for VM with disk/s
2. Preview snapshot

Actual results:
The disk/s are removed

Expected results:
Disks to remain

Comment 1 Michael Burman 2017-10-25 06:06:32 UTC
After undo, the VM remains with no disks and non-operational

Comment 2 Michael Burman 2017-10-25 06:07:58 UTC
Created attachment 1343095 [details]
engine log

Comment 3 Michael Burman 2017-10-25 06:26:21 UTC
The root issue here is that the snapshot created without the VM's disks and without the VM's network interfaces.
In the bottom line, when creating a snaphsot, it contains no disks and no networks cards.
Doing undo will leave the VM completely non-operational.

Comment 4 Allon Mureinik 2017-10-25 09:36:18 UTC
Maor, this bug was introduced here:

https://gerrit.ovirt.org/#/c/82429/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java (see line 616)

You're creating an empty ArrayList, and then iterate it, which of course does nothing, whereas the original implementation of ovfManager.importVm before the patch received this List and populated it before iterating it.

Please address this ASAP.

Comment 5 Tal Nisan 2017-10-25 10:14:37 UTC
Note that the same problem exists here:

https://gerrit.ovirt.org/#/c/82429/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandler.java (line 765)

Line 766 should be changed to fullEntityOvfData.setDiskImages(fullEntityOvfData.getDiskImages());

Comment 6 Maor 2017-10-25 11:30:00 UTC
(In reply to Tal Nisan from comment #5)
> Note that the same problem exists here:
> 
> https://gerrit.ovirt.org/#/c/82429/18/backend/manager/modules/bll/src/main/
> java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandler.java (line
> 765)
> 
> Line 766 should be changed to
> fullEntityOvfData.setDiskImages(fullEntityOvfData.getDiskImages());

That is not a bug since we already set this list in line 766:
  fullEntityOvfData.setDiskImages(snapshotImages);

Comment 7 Maor 2017-10-25 11:30:14 UTC
(In reply to Tal Nisan from comment #5)
> Note that the same problem exists here:
> 
> https://gerrit.ovirt.org/#/c/82429/18/backend/manager/modules/bll/src/main/
> java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandler.java (line
> 765)
> 
> Line 766 should be changed to
> fullEntityOvfData.setDiskImages(fullEntityOvfData.getDiskImages());

That is not a bug since we already set this list in line 766:
  fullEntityOvfData.setDiskImages(snapshotImages);

Comment 8 Maor 2017-10-25 11:31:30 UTC
I published a patch which fix the issue and also make the code a bit more clear in ImagesHandler.java (line 765)

Comment 9 Raz Tamir 2017-10-30 16:44:31 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20171027213842.gitded437c.el7.centos

After preview/preview + undo the VM's disks/network interfaces still exists

Comment 10 Sandro Bonazzola 2017-12-20 11:20:04 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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