Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1364456 - VM's cluster compatibility version override does not change the default machine type
Summary: VM's cluster compatibility version override does not change the default machi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Marek Libra
QA Contact: sefi litmanovich
URL:
Whiteboard:
: 1360783 (view as bug list)
Depends On:
Blocks: 1417493
TreeView+ depends on / blocked
 
Reported: 2016-08-05 11:55 UTC by Marek Libra
Modified: 2017-07-12 04:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
A virtual machine snapshot with memory from a previous cluster version can now be previewed. The virtual machine's custom compatibility version will be temporarily set to the previous cluster version. The custom compatibility version is reverted by undoing the preview, or via a cold reboot (shut down and restart).
Clone Of:
Environment:
Last Closed: 2017-02-01 14:52:05 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 63062 master MERGED core: Set the Custom CV at old snapshot preview 2016-09-06 15:35:19 UTC
oVirt gerrit 63465 ovirt-engine-4.0 MERGED core: Set the Custom CV at old snapshot preview 2016-09-07 08:23:44 UTC
oVirt gerrit 63474 ovirt-engine-4.0.4 MERGED core: Set the Custom CV at old snapshot preview 2016-09-07 09:51:27 UTC
oVirt gerrit 64129 master MERGED core: Set orig cluster version on VM snapshot preview 2016-12-06 14:32:45 UTC
oVirt gerrit 64130 master MERGED webadmin: Show Old Cluster Version on VM Snapshot preview 2016-12-20 20:16:38 UTC
oVirt gerrit 68826 ovirt-engine-4.1 MERGED webadmin: Show Old Cluster Version on VM Snapshot preview 2016-12-20 21:10:50 UTC
oVirt gerrit 69915 master MERGED core: RunVmCommand - Emulated Machine conforms the CCV 2017-01-15 16:16:39 UTC
oVirt gerrit 70463 ovirt-engine-4.1 MERGED core: RunVmCommand - Emulated Machine conforms the CCV 2017-01-16 08:52:42 UTC

Description Marek Libra 2016-08-05 11:55:20 UTC
After cluster version change, VM snapshot in preview shall have Custom compatibility version temporarily set to the original cluster version it was taken in.

Temporarily set custom compatibility version is implemented by #1356027 (or 61079 gerrit). Such a VM has custom compatibility version set until power off.

The UpdateVmCommand will be called on these previewed snapshots.

Snapshots with RAM originating in previous cluster version will not be blocked from preview.

Comment 1 Michal Skrivanek 2016-08-06 06:18:47 UTC
How is it related to devices?

Comment 2 Marek Libra 2016-08-16 06:19:43 UTC
Not exclusively, but i.e. graphics devices are updated. Actually that was the original reason for calling the UpdateVmCommand within update cluster scenario.
I'm changing BZ title to be more accurate.

Comment 3 Marek Libra 2016-08-17 11:41:45 UTC
*** Bug 1360783 has been marked as a duplicate of this bug. ***

Comment 4 Tomas Jelinek 2016-08-19 11:43:56 UTC
The code change is quite risky hitting issues with locking and next run snapshots' editable fields. Due to this risks proposing it for 4.0.4. 
Restoring a snapshot in 4.0.3 with memory will contain a warning:
"
The selected snapshot's memory can't be properly restored since it was  created in different cluster version. Executing new cluster features can cause failure of the running preview until it's shut down and restarted. Please confirm the memory shall be  restored anyway.
"
and this message is going to be added as part of https://bugzilla.redhat.com/show_bug.cgi?id=1356027
in 4.0.3

Comment 5 sefi litmanovich 2016-09-13 14:48:12 UTC
Cannot verify, tested with rhevm-4.0.4.1-0.1.el7ev.noarch and rhevm-4.0.4.2-0.1.el7ev.noarch as well.

In both cases the following flow produces what seems as the wrong result:

1. In dc-cluster 3.6 create a vm.
2. Start the vm and create a live snapshot with memory.
3. Upgrade the cluster to 4.0 while the vm is still up. After upgrade vm has ccv 3.6.
4. Stop the vm - vm has now ccv 4.0.
5. Preview the snapshot - the warning message mentioned in comment#4 is issues as expected. Check restore memory box and click 'ok'.

Result:
The vm's snapshot is restored, ccv is still set to 4.0 instead of 3.6. Regardless to that after the vm is running the dom xml of the vm is set as a 3.6 (see dom xml in vdsm.log.1.xz that I will attach) in line with:
'14:49:19,937::vm::1963::virt.vm::'

Expected:
Upon snapshot preview with memory the vm's ccv should be set to 3.6 according to the snapshot.

Comment 6 Red Hat Bugzilla Rules Engine 2016-09-13 14:48:48 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Michal Skrivanek 2016-09-15 07:56:53 UTC
let's see what's wrong and then asses whether it is worth a backport to 4.0
The result as described in comment #5 is acceptable as is, it's just the ccv field giving misleading information, but the VM itself runs as it should

Comment 8 Marek Libra 2016-09-19 12:24:38 UTC
I would suggest to backport to 4.0.
Without 64129 patch, custom compatibility version is not set on snapshot preview with memory _and disks_ .

Comment 9 Sandro Bonazzola 2016-12-12 13:57:18 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 10 sefi litmanovich 2017-01-02 15:02:58 UTC
Cannot verify (sorry), tested with rhevm-4.1.0-0.3.beta2.el7.noarch.

The result is kind of a mirror of the problem last time.
Steps:

1. In dc-cluster 4.0 create a vm.
2. Start the vm and create a live snapshot with memory.
3. Upgrade the cluster to 4.1 while the vm is still up. After upgrade vm has ccv 4.0.
4. Stop the vm - vm has now ccv 4.1.
5. Preview the snapshot - the warning message mentioned in comment#4 is issues as expected. Check restore memory box and click 'ok'.

Result:
This time, the vm is previewed and the ccv is set correctly back to 4.0, but this time, when I start the previewed vm, and check it's xml in virsh I see that it's machine type is now  'pc-i440fx-rhel7.3.0' which is the default for 4.1 whereas if it's a 4.0 compatible vm it suppose to have 'pc-i440fx-rhel7.2.0' machine type

Expected:
Upon snapshot preview with memory the vm's ccv should be set to 4.0 according to the snapshot + vm should start with 4.0 default emulated machine.

Comment 11 Michal Skrivanek 2017-01-03 15:04:27 UTC
this is actually a problem since the original implementation applicable to all VM runs, it should be fixed for all cases at once, changing title

Comment 12 sefi litmanovich 2017-01-26 13:44:29 UTC
Verified with rhevm-4.1.0.2-0.2.el7.noarch.

1. Created vm in 4.0 dc-cluster.
2. Started the vm and created live snapshot with memory for it.
3. Upgraded the cluster to 4.1 while vm is still up.
4. Stopped vm.
5. Verified ccv changed to 4.1 and started the vm to verify machine type is set correctly to 'pc-i440fx-rhel7.3.0'.
6. Stopped vm.
7. Previewed snapshot with memory.
8. Verified ccv changed back to 4.0 and started the vm to verify machine type was set back to 'pc-i440fx-rhel7.2.0'.
9. Stopped vm.
10. Undo the snapshot preview.
11. Verified ccv changed to 4.1 and started the vm to verify machine type is set correctly to 'pc-i440fx-rhel7.3.0'.

Comment 13 Avital Pinnick 2017-07-12 04:16:23 UTC
I set RDT to '-' because this limitation is not to be included in release notes. (BZ#1400127)


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