Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1189570

Summary: Locked snapshot prevents VM's basic operations, after it's disk was removed
Product: Red Hat Enterprise Virtualization Manager Reporter: Ori Gofen <ogofen>
Component: ovirt-engineAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, gklein, lpeer, lsurette, pvilayat, rbalakri, Rhev-m-bugs, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0Flags: ylavi: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-backend-3.6.0-0.0.master.20150412172306.git55ba764 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1195000 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1195000    
Attachments:
Description Flags
logs none

Description Ori Gofen 2015-02-05 14:03:47 UTC
Created attachment 988514 [details]
logs

Description of problem:
When removing a disk from a VM with existing snapshots, RHEVM doesn't clear the psql db entry for the snapshot, and hence, this operation results in a VM with no disks but with snapshots entries.  When this snapshot is a live .snapshot (on block domains), there are also redundant logical volumes that remain on the host.

When trying to remove one of the snapshots, it remains locked (constant) and prevents all basic VM operations, for example when trying to remove the VM, RHEVM displays:
"Cannot remove VM. The VM is performing an operation on a Snapshot. Please wait for the operation to finish, and try again."

When trying to start the VM without a disk, it prompts the usual error, but when attempting to add a disk, the following error is recieved:
"Cannot add Virtual Machine Disk. The VM is performing an operation on a Snapshot. Please wait for the operation to finish, and try again."

Restart ovirt-engine and vdsm does not address this issue


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

How reproducible:
100%

Steps to Reproduce:
1.Have a VM + 1xdisk(mine was block) + os
2.perform 2 live snapshots
3.stop VM
4. remove one of it's snapshots
5. attempt VM basic operations

Actual results:
VM basic operation's are CDA blocked

Expected results:
when removing VM's disk, all it's corresponding logical volumes should be removed from host, and from the snapshot db entry

Additional info:

Comment 1 Allon Mureinik 2015-02-06 09:15:43 UTC
(In reply to Ori Gofen from comment #0)
> Description of problem:
> When removing a disk from a VM with existing snapshots, RHEVM doesn't clear
> the psql db entry for the snapshot, and hence, this operation results in a
> VM with no disks but with snapshots entries.
This is a by-design behavior. No problem here.

> When this snapshot is a live
> .snapshot (on block domains), there are also redundant logical volumes that
> remain on the host.
Which LVs? The memory volumes?

> 
> When trying to remove one of the snapshots, it remains locked (constant) and
> prevents all basic VM operations, for example when trying to remove the VM,
> RHEVM displays:
> "Cannot remove VM. The VM is performing an operation on a Snapshot. Please
> wait for the operation to finish, and try again."
This, on the other hand, is a bug.

Off hand, seems that removing a diskless snapshot does not perform the endAction properly.
Taking to whiteboard=storage to investigate. If we need the virt engineers' help to research/solve, we'll move it.

Comment 3 Ori Gofen 2015-04-26 12:45:21 UTC
Verified on oVirt3.6, the operation is Blocked:
"Cannot detach Virtual Machine Disk. The disk is already configured in a snapshot. In order to detach it, remove the disk's snapshots."

Comment 4 Allon Mureinik 2015-08-10 17:04:30 UTC
*** Bug 1242874 has been marked as a duplicate of this bug. ***

Comment 5 Allon Mureinik 2016-03-10 10:40:16 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 6 Allon Mureinik 2016-03-10 10:40:16 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 7 Allon Mureinik 2016-03-10 10:45:50 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 8 Allon Mureinik 2016-03-10 12:02:26 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE