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".
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
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
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.
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
Due to QE capacity we are not going to cover this issue in our automation