+++ 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)
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)
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)
(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)
(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)
yes, that is correct we should add that to rhv-log-collector-analyzer as well (Originally by michal.skrivanek)
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.
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).
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