Bug 1715877 - [downstream clone - 4.3.5] engine-setup should check for snapshots in unsupported CL
Summary: [downstream clone - 4.3.5] engine-setup should check for snapshots in unsuppo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.3.5
: 4.3.5
Assignee: Yedidyah Bar David
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On: 1712890
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-31 13:28 UTC by RHV bug bot
Modified: 2019-08-12 11:53 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.3.5.1
Doc Type: If docs needed, set a value
Doc Text:
In this release, when performing an upgrade, engine-setup prompts the user about Virtual Machines that have snapshots that are incompatible with the version you are trying to upgrade to. It's safe to let it proceed, but it's not safe to use or to preview these snapshots following the upgrade.
Clone Of: 1712890
Environment:
Last Closed: 2019-08-12 11:53:28 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:2431 0 None None None 2019-08-12 11:53:36 UTC
oVirt gerrit 100798 0 'None' MERGED packaging: setup: Prompt about incompatible snapshots 2020-07-21 07:16:56 UTC
oVirt gerrit 100872 0 'None' MERGED packaging: setup: Allow not logging database query results 2020-07-21 07:16:56 UTC

Description RHV bug bot 2019-05-31 13:28:50 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1712890 +++
======================================================================

If a VM has a snapshot made in DC compatibility level that is not supported by the version we are upgrading to, the snapshot would not be usable in that version. 

engine-setup should check for snapshots in unsupported CL, let the user know about this + provide the ability to stop the upgrade, if user decides so.

For example, if a VM has a snapshot created in 4.0, and engine-setup is upgrading to CL 4.3, it should detect those snapshots and let the user know.

(Originally by Marina Kalinin)

Comment 1 RHV bug bot 2019-05-31 13:28:52 UTC
Michal, can you please provide the exact requirements here to detect when the CL will not be supported in the new version?

(Originally by Marina Kalinin)

Comment 2 RHV bug bot 2019-05-31 13:28:53 UTC
similar to existing stuff in https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/plugins/ovirt-engine-checks/ovirt-engine/db/versions.py
it just should go through the snapshots in addition

(Originally by michal.skrivanek)

Comment 3 RHV bug bot 2019-05-31 13:28:55 UTC
(In reply to Marina Kalinin from comment #0)
> engine-setup should check for snapshots in unsupported CL, let the user know
> about this + provide the ability to stop the upgrade, if user decides so.

Text?

Perhaps some link to more information? E.g. what specific actions will not work if you do upgrade? What happens if you still tries these actions (IIRC I lost VMs in the past by trying to preview such snapshots)?

Default to "No" (abort setup)?

If user says "Yes", ask again to confirm?

(Originally by didi)

Comment 4 RHV bug bot 2019-05-31 13:28:57 UTC
(In reply to Michal Skrivanek from comment #2)
> similar to existing stuff in
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/plugins/
> ovirt-engine-checks/ovirt-engine/db/versions.py
> it just should go through the snapshots in addition

Now created a snapshot, and the only place in the db where I can see the compatibility level of that snapshot is in the xml dump of the vm in vm_configuration (in table "snapshots"). Is it indeed the only place? And I should parse the xml for each snapshot, checking "/ovf:Envelope/Content/ClusterCompatibilityVersion" for each, comparing with current version?

(Originally by didi)

Comment 5 RHV bug bot 2019-05-31 13:28:58 UTC
yes, that is correct
we should add that to rhv-log-collector-analyzer as well

(Originally by michal.skrivanek)

Comment 8 Yedidyah Bar David 2019-06-17 10:24:12 UTC
QE: Please verify on a system with many old snapshots. If you do not have one old enough, you can fake one by setting up a new system with many new snapshots, then e.g.:

update snapshots set vm_configuration=REPLACE(vm_configuration, '4.3', '3.5') where <some condition>

And also invalid configurations with:

update snapshots set vm_configuration=REPLACE(vm_configuration, 'xml version', 'xml bad version') where <some condition>

But better test on a real system, if you have one, or can create one - setup 4.0, create many snapshots, upgrade to 4.1->4.2->4.3. Even better if you have one upgraded from 3.y.

Comment 10 Petr Matyáš 2019-06-25 14:54:04 UTC
Verified on ovirt-engine-4.3.5.1-0.1.el7.noarch

I've tried this with 100 snapshots with 3.5 version and 100 snapshots with invalid configuration, this took basically no time in engine setup.

I won't be trying with more as even creating this many snapshots took a lot of time (it takes about 30 seconds to create 1 snapshot).

Comment 14 errata-xmlrpc 2019-08-12 11:53:28 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, 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/RHEA-2019:2431


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