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

Bug 1714587

Summary: Able to delete VM snapshot even though rhv console shows image is locked
Product: [oVirt] ovirt-engine Reporter: Tal Nisan <tnisan>
Component: BLL.StorageAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: high Docs Contact:
Priority: unspecified    
Version: futureCC: aefrat, bugs, derez, gauravjadhav.jadhav, ketan.pachpande, mavital, pchavva, Rhev-m-bugs, tnisan
Target Milestone: ovirt-4.3.5Flags: pm-rhel: ovirt-4.3+
Target Release: 4.3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1710247 Environment:
Last Closed: 2019-07-30 14:08:41 UTC Type: ---
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: 1710247    
Bug Blocks: 1694070, 1709501    

Description Tal Nisan 2019-05-28 11:30:00 UTC
+++ This bug was initially created as a clone of Bug #1710247 +++

Description of problem:
Data corruption due to snapshot merge when data is being downloaded using image transfer API.


Version-Release number of selected component (if applicable):
4.2.8.7-0.1.el7ev

How reproducible:
Easily on different setups 

Steps to Reproduce:
1.Take VM snapshot
2.Initiate Image transfer using API
3.Start data download for the disk using transfer url
4.During data movement, delete the snapshot

Actual results:
RHV allows deletion of snapshot while data transfer is going on and RHV event shows the snapshot is merged.
This results in downloading data of Active VM, which can cause data inconsistency.

Expected results:
Snapshot deletion should not be allowed till the data transfer is finalized.


Additional info:
I have attached the engine logs when the issue was reproduced for the VM id : 8a1582d1-c08b-41f7-b9e1-0187bdaf5620

--- Additional comment from Tal Nisan on 2019-05-22 14:55:24 IDT ---

Daniel, we need to make sure the disk will be locked for removal operations while downloading most likely

Comment 1 Avihai 2019-06-30 07:24:26 UTC
Hi Tal, 

This bug is the same as Bug 1721390 (same patches) and I'm guessing it should be targeted to 4.4 as Bug 1721390 it already on 4.3.5 (has ' [downstream clone - 4.3.5]' in the headline).

Please retarget.

Comment 2 Avihai 2019-06-30 07:25:10 UTC
(In reply to Avihai from comment #1)
> Hi Tal, 
> 
> This bug is the same as Bug 1721390 (same patches) and I'm guessing it
> should be targeted to 4.4 as Bug 1721390 it already on 4.3.5 (has '
> [downstream clone - 4.3.5]' in the headline).
> 
> Please retarget.

and change to 'MODIFY'

Comment 3 Avihai 2019-06-30 10:49:44 UTC
(In reply to Avihai from comment #2)
> (In reply to Avihai from comment #1)
> > Hi Tal, 
> > 
> > This bug is the same as Bug 1721390 (same patches) and I'm guessing it
> > should be targeted to 4.4 as Bug 1721390 it already on 4.3.5 (has '
> > [downstream clone - 4.3.5]' in the headline).
> > 
> > Please retarget.
> 
> and change to 'MODIFY'

Tal, please disregard

Comment 6 Yosi Ben Shimon 2019-07-08 16:42:29 UTC
Tested using:
ovirt-engine-4.3.5.3-0.1.el7.noarch
According to the steps in comment #5

When tried to delete the snapshot while the disk was downloaded I've got this validation in the engine log (and UI):

2019-07-08 16:13:16,873+03 WARN  [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (default task-39) [c65a2e85-7469-4300-a42e-599154c1931e] Validation of action 'RemoveSnapshot' failed for user admin@internal-authz. Reasons: VAR__TYPE__SNAPSHOT,VAR__ACTION__REMOVE,ACTION_TYPE_FAILED_DISKS_LOCKED,$diskAliases test_vm_Disk1

Moving to VERIFIED

Comment 7 Sandro Bonazzola 2019-07-30 14:08:41 UTC
This bugzilla is included in oVirt 4.3.5 release, published on July 30th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 release, it has been closed with a resolution of CURRENT RELEASE.

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