Bug 1197808 - Unable to remove VM previewing a snapshot
Summary: Unable to remove VM previewing a snapshot
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.UserPortal
Version: ---
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.0.0-alpha
: 4.0.0
Assignee: Arik
QA Contact: movciari
Depends On:
Blocks: 1213937
TreeView+ depends on / blocked
Reported: 2015-03-02 16:26 UTC by Martin Bašti
Modified: 2016-07-05 08:04 UTC (History)
10 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-05 08:04:28 UTC
oVirt Team: Virt
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 51102 0 master MERGED core: allow to remove vm that is previewing a snapshot 2015-12-28 11:28:36 UTC

Description Martin Bašti 2015-03-02 16:26:06 UTC
Description of problem:
I can not remove VM with snapshot in preview mode. (VM is powered off)

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

How reproducible:

Steps to Reproduce:
1. Create a snapshot
2. Preview the snapshot
3. Turn off the VM
4. Remove the VM

Actual results:
"Cannot remove VM. VM is previewing a Snapshot."

Expected results:
VM will be removed.

Additional info:

Comment 1 Omer Frenkel 2015-03-03 08:30:50 UTC
Allon, any storage limitation on removing disk in preview?
it think it means that one of the images in the chain has 2 volumes linked to it, the original and the previewed one

Comment 2 Allon Mureinik 2015-03-03 09:22:23 UTC
(In reply to Omer Frenkel from comment #1)
> it think it means that one of the images in the chain has 2 volumes linked
> to it, the original and the previewed one

> Allon, any storage limitation on removing disk in preview?
In the old API this should work (but need to double check).
In the SPM-less API, you'd just have to remove all the volumes.

Comment 3 Omer Frenkel 2015-09-07 09:12:21 UTC
There is an issue with allowing this: since the snapshot might contain memory volumes, the engine has logic of reference count for these volumes,
if the count is more than 1, the memory volumes are not deleted because it is assumed they are in use by other snapshot.
when vm is in preview, and the preview has memory volumes, the count is 2 because the active snapshot is also referencing the volumes.

so the result is the vm is removed but we leave unused memory volumes in the storage, which is not good.

we should improve the logic around this, i suggest to re-think about this in 4.0 where we plan to improve the implementation of memory volumes in the engine.

Comment 4 Red Hat Bugzilla Rules Engine 2015-11-30 22:02:27 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 Arik 2015-12-28 08:17:05 UTC
With https://gerrit.ovirt.org/#/c/50478/ the memory volumes are not an issue anymore.

Comment 6 Sandro Bonazzola 2016-07-05 08:04:28 UTC
oVirt 4.0.0 has been released, closing current release.

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