Bug 1828241

Summary: Deleting snapshot do not display a lock for it's disks under "Disk Snapshots" tab.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ameya Charekar <achareka>
Component: ovirt-engineAssignee: shani <sleviim>
Status: CLOSED ERRATA QA Contact: Ilan Zuckerman <izuckerm>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bzlotnik, mavital, sfishbai, sleviim, tnisan
Target Milestone: ovirt-4.4.3   
Target Release: 4.4.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.3.3 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-24 13:09:21 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:

Description Ameya Charekar 2020-04-27 11:49:49 UTC
Description of problem:

Deleting snapshot from "Snapshots" tab, do not displays a lock for it's disk/s under "Disk Snapshots" tab on RHV-M portal.

Even though disk is locked, Status remains OK.

Version-Release number of selected component (if applicable):
RHV-M 4.3.9.4-11.el7

How reproducible:
Always

Steps to Reproduce:
1. Delete snapshot for a VM. [Compute -> Virtual Machines -> <VM> -> Snapshots -> Delete a snapshot]

2. Check snapshot disk's status from "Disk Snapshots" tab. [Storage -> Storage Domains -> <SD> -> Disk Snapshots -> Check Status]
 

Actual results:
Disk Status is OK.

Expected results:
Disk Status should be Image Locked.

Additional info:

During snapshot deletion operation, if we attempt to delete disk from "Disk Snapshots" tab, it fails with following error:-
~~~
Error while executing action: Cannot remove Disk Snapshot. The VM is performing an operation on a Snapshot. Please wait for the operation to finish, and try again.
~~~

On other hand deleting a disk from "Disk Snapshots" tab correctly reflects it's status in "Snapshots" tab, as Status changes from "OK" to "Image Locked".

Comment 1 Tal Nisan 2020-04-27 14:29:52 UTC
Targeting to 4.5, the backend blocks the operation as it should, showing the lock for the disks under a snapshot when deleting a snapshot never showed this icon so this needs to be added

Comment 7 Benny Zlotnik 2020-08-05 11:57:24 UTC
The problem is that this view uses the status from the images table, where the image is unlocked, while the snapshot in the snapshots table is locked.
There are a couple of ways to go about this:
1. Map the status of the snapshot to the status of the image in GetAllDiskSnapshotsByStorageDomainIdQuery, this is the simplest solution
2. Properly lock the images when performing live/cold merge, this the "right" solution as leaving them unlocked seems incorrect. Fixing this is also simple but might have some non-obvious consequences

Comment 12 Ilan Zuckerman 2020-09-29 08:53:55 UTC
Verified on rhv-4.4.3-6 following the steps as described in description of this BZ.
When deleting the snapshot, the disk appears as 'locked' in the "Disk Snapshots" tab. [Storage -> Storage Domains -> <SD> -> Disk Snapshots -> Check Status]
After the deletion is done, the disk is removed from that "Disk Snapshots" tab.

Comment 17 errata-xmlrpc 2020-11-24 13:09:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: Red Hat Virtualization security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:5179

Comment 18 meital avital 2022-05-08 11:32:35 UTC
Due to QE capacity we are not going to cover this issue in our automation