Bug 1731590

Summary: Cannot preview snapshot, it fails and VM remains locked.
Product: Red Hat Enterprise Virtualization Manager Reporter: Bimal Chollera <bcholler>
Component: ovirt-engineAssignee: shani <sleviim>
Status: CLOSED ERRATA QA Contact: Ilan Zuckerman <izuckerm>
Severity: high Docs Contact:
Priority: high    
Version: 4.3.4CC: bugs, gveitmic, jcoscia, mkalinin, pchocron, pelauter, rdlugyhe, sgoodman, sleviim, tnisan
Target Milestone: ovirt-4.4.0Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine 4.4.0 alpha 551beb5b Doc Type: Bug Fix
Doc Text:
Before this update, previewing a snapshot of a virtual machine, where the snapshot of one or more of the machine's disks did not exist or had no image with active set to "true", caused a null pointer exception to appear in the logs, and the virtual machine remained locked. With this update, before a snapshot preview occurs, a database query checks for any damaged images in the set of virtual machine images. If the query finds a damaged image, the preview operation is blocked. After you fix the damaged image, the preview operation should work.
Story Points: ---
Clone Of: 1647634 Environment:
Last Closed: 2020-08-04 13:19:49 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: 1647634    
Bug Blocks:    

Comment 5 Daniel Gur 2019-08-28 13:13:19 UTC
sync2jira

Comment 6 Daniel Gur 2019-08-28 13:17:31 UTC
sync2jira

Comment 10 RHV bug bot 2020-01-24 19:48:14 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{}', ]

For more info please contact: rhv-devops

Comment 12 Ilan Zuckerman 2020-03-18 14:09:37 UTC
Verified according the steps from description by Bimal Chollera:

1. Create VM
2. Add 2 or 3 snapshots
3. Add a second disk to the VM
4. Preview one of the old snapshots, select:
"Include in the previewed VM only the disks that are included in the snapshot."

Actual result: Didnt notice any vm locks, infinite locks or errors in the log or UI.

Was using:
ovirt-engine-4.4.0-0.25.master.el8ev.noarch
VM template with rhel8
Both disks (OS and additional) on ISCSI
Made 3 snapshots before 


Also verified according those steps from comment #4:
1.	Create a VM with couple disks.
2.	On second disk, create a snapshot.
3.	Shutdown the VM.
4.	Deactivate the first disk
5.	From the RHV-M DB, update the images table of the disk image to make the active = 'f'
	Update the images table of the disk image and add a bogus vm_snapshot_id
6.	Now preview a snapshot image.

Actual result:
When previewing the snapshot, got the following message in the UI as expected (thanks to Shani explanation):

Error while executing action:
bz_1731590_comment4:
Cannot preview Snapshot. The following disk IDs are associated with a damaged snapshot and may require manual inspection:
82915158-ef8d-46a9-8502-82d7d7168e49

Moving this to verified.

Comment 13 Steve Goodman 2020-04-26 14:12:50 UTC
Shani, please verify that the doc text is correct:

Before this update,  previewing a snapshot of a virtual machine, where the snapshot of one or more of the machine's disks did not exist or has no image with active set to "true", caused a null pointer exception  to appear in the logs, and the virtual machine remained locked. 

With this update, before a snapshot preview occurs, a database query checks for any damaged images in the set of virtual machine images. If the query finds a damaged image, the preview operation is blocked. After you fix the damaged image, the preview operation should work.

Comment 14 shani 2020-04-26 15:56:12 UTC
LGTM.
The trailing spaces on "update,  previewing" and "exception  to" should be removed.

Comment 15 Steve Goodman 2020-04-27 04:21:40 UTC
(In reply to shani from comment #14)
> LGTM.
> The trailing spaces on "update,  previewing" and "exception  to" should be
> removed.

Thanks. I don't see any trailing spaces, though.

Comment 21 errata-xmlrpc 2020-08-04 13:19:49 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 (Important: RHV Manager (ovirt-engine) 4.4 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:3247