Bug 1714587 - Able to delete VM snapshot even though rhv console shows image is locked
Summary: Able to delete VM snapshot even though rhv console shows image is locked
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.3.5
: 4.3.5
Assignee: Daniel Erez
QA Contact: Yosi Ben Shimon
URL:
Whiteboard:
Depends On: 1710247
Blocks: 1694070 1709501
TreeView+ depends on / blocked
 
Reported: 2019-05-28 11:30 UTC by Tal Nisan
Modified: 2019-07-30 14:08 UTC (History)
9 users (show)

Fixed In Version: ovirt-engine-4.3.5
Clone Of: 1710247
Environment:
Last Closed: 2019-07-30 14:08:41 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.3+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 100354 0 'None' MERGED core: remove snapshot - validate locked images 2020-09-24 17:49:55 UTC
oVirt gerrit 100504 0 'None' MERGED core: remove snapshot - validate locked images 2020-09-24 17:49:55 UTC

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.


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