Bug 1744557

Summary: RHV 4.3 throws an exception when trying to access VMs which have snapshots from unsupported compatibility levels
Product: Red Hat Enterprise Virtualization Manager Reporter: Ryan Spagnola <rspagnol>
Component: ovirt-engineAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Beni Pelled <bpelled>
Severity: high Docs Contact:
Priority: medium    
Version: 4.3.0CC: ahadas, akrejcir, dougsland, lavenel, lsvaty, michal.skrivanek, mperina, mteixeira, mtessun, obarenbo, rciatti, tdosek
Target Milestone: ovirt-4.4.1Keywords: ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: rhv-4.4.0-29 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1755869 (view as bug list) Environment:
Last Closed: 2020-08-04 13:20:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1755869    

Comment 18 Martin Perina 2019-09-04 13:27:06 UTC
Based on above moving to RHV

Comment 21 Michal Skrivanek 2019-09-05 12:04:05 UTC
which operation fail? on the snapshot or vm? i suppose the VM does not have a custom copat level of 3.6 but the snapshot may?

Comment 24 Martin Perina 2019-09-17 16:41:58 UTC
*** Bug 1752732 has been marked as a duplicate of this bug. ***

Comment 29 Andrej Krejcir 2019-09-20 12:56:38 UTC
This is the flow:
- The API gets a request to get a snapshot.
- The snapshot is retrieved from the DB, but the API result also needs a VM configuration.
- GetVmConfigurationBySnapshotQuery is called, which gets the VM from DB and applies the OVF configuration changes to it
- The VM config contains fields that are calculated using the config values: maximum memory size, resume behavior

Maybe it is not needed to consider the VM version for these values and just use values from OVF.

Comment 30 Michal Skrivanek 2019-09-23 11:54:51 UTC
I'd say that we should revise why we do autoSelectResumeBehavior() - we should do that only when not set already, no? now it's being always called.

for maxmemory - I think the code is there to fix up invalid mem values in snapshots...shouldn't really be needed - at least when the definition no longer exists. I'd use the current lowest supported version if that's easy to query.

Comment 31 Andrej Krejcir 2019-09-23 12:31:25 UTC
The current patch temporarily sets the custom compatibility version to the lowest supported.

Ok, I will look into why we use autoSelectResumeBehavior() there.

Comment 32 Andrej Krejcir 2019-09-26 11:05:01 UTC
The master patches are merged. Do we want to backport this to 4.3?

Comment 33 Ryan Barry 2019-09-26 11:06:06 UTC
I'll clone

Comment 37 RHV bug bot 2019-12-13 13:15:15 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops

Comment 38 RHV bug bot 2019-12-20 17:44:57 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops

Comment 39 RHV bug bot 2020-01-08 14:47:25 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops

Comment 40 RHV bug bot 2020-01-08 15:16:22 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops

Comment 41 RHV bug bot 2020-01-24 19:49:07 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

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

For more info please contact: rhv-devops

Comment 43 Beni Pelled 2020-04-23 14:42:55 UTC
Verified with:
- RHV 4.4.0-0.32.master.el8ev
- libvirt-6.0.0-17.module+el8.2.0+6257+0d066c28.x86_64
- vdsm-4.40.13-1.el8ev.x86_64

Verification steps:
1. On a RHV 4.2 instance: create a DC, Cluster, Host, and SD with compatibility-version = 3.6
2. Create a VM and make sure the compatibility-version is set with 3.6
3. Create a snapshot and make sure the snapshot is available by https://<engine>/ovirt-engine/api/vms/<vm_uuid>/snapshots
4. Export the VM to export-domain and import the VM on a RHV 4.4 environment
5. Make sure the snapshot is available on the RHV 4.4 environment by https://<engine>/ovirt-engine/api/vms/<vm_uuid>/snapshots

Result:
- The snapshot is accessible on the RHV 4.4 environment by https://<engine>/ovirt-engine/api/vms/<vm_uuid>/snapshots

Comment 48 errata-xmlrpc 2020-08-04 13:20:09 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