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

Bug 1368203

Summary: Remove auto-generated snapshot job is stuck in status STARTED and the vm is "blocked" if a vm is stopped during a LSM
Product: [oVirt] ovirt-engine Reporter: Carlos Mestre González <cmestreg>
Component: BLL.StorageAssignee: Ala Hino <ahino>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.2.6CC: ahino, amureini, bugs, tnisan
Target Milestone: ovirt-4.0.4Keywords: Regression
Target Release: 4.0.4Flags: amureini: ovirt-4.0.z?
rule-engine: blocker?
rule-engine: planning_ack?
tnisan: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Power-off the VM during LSM Consequence: Job doesn't complete Fix: Prevent removing auto-generated snapshot if the VM is powered-off during LSM. Preventing removing the auto-generated snapshot is required because, if the VM is down and we try to remove the auto-generated snapshot, cold merge will be performed. Cold merge is not desired during LSM because it copies base volume data to top volume in contrast to live merge where data from top volume is copied to base volume. Result: Operation fails and the auto-generated snapshot isn't removed
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:35:24 UTC 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:
Attachments:
Description Flags
vdsm of all host and engine log none

Description Carlos Mestre González 2016-08-18 16:20:19 UTC
Description of problem:
Stop a vm during a live storage migration causes the job "Removing Snapshot Auto-generated for Live Storage Migration of VM X" to hang and also making the vm unusable because there are "Related operation is currently in progress" 

Version-Release number of selected component (if applicable):
rhevm-4.0.2.6-0.1.el7ev.noarch

How reproducible:
50%

Steps to Reproduce:
1. Create a vm with a disk (tested with iscsi)
2. Start the vm
3. Move the disk to another domain (live storage migration) (tested with nfs)
4. When the migration starts Power off the VM

Actual results:
- Vm powers off, engine tries to remove the snapshot auto-generated during the live migrations but the job is stuck in status STARTED.

Expected results:
- LSM is reverted properly, job remove snapshot finishes successfully 

Additional info:

Comment 1 Carlos Mestre González 2016-08-18 16:26:31 UTC
Created attachment 1191931 [details]
vdsm of all host and engine log

job id of removal of snapshot: 2042ceb3-4777-4414-a44f-ba1a882ced09
vm id: 06a7109f-bfb5-4c80-83b4-80f1922d0fe5

Comment 2 Red Hat Bugzilla Rules Engine 2016-08-21 07:21:05 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Ala Hino 2016-08-25 13:04:42 UTC
Carlos,

Please note that once this BZ is resolved, the auto-generated snapshot will not be removed. This is because if the VM is down and we try to remove the auto-generated snapshot, cold merge will be performed. Cold merge is not desired during LSM because it copies base volume data to top volume in contrast to live merge where data from top volume is copied to base volume.

BZ 1369942 documents this behavior and once fixed, the auto-generated snapshot will be removed in this use case.

Comment 4 Allon Mureinik 2016-08-29 12:16:00 UTC
Ala, please add some doctext explaining the behavior in comment 3.
Thanks!

Comment 5 Raz Tamir 2016-09-01 15:22:57 UTC
Verified on ovirt-engine-4.0.4-0.1.el7ev.noarch
According to Doc text the auto-generated snapshot should remain and this is the case