Bug 1436325

Summary: Wrong emulated machine for a VM with custom compatibility version
Product: [oVirt] ovirt-engine Reporter: Arik <ahadas>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: high    
Version: 4.1.0CC: baptiste.agasse, bugs, lveyde, michal.skrivanek, movciari, nsimsolo, pstehlik
Target Milestone: ovirt-4.1.2Flags: rule-engine: ovirt-4.1+
Target Release: 4.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:12:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arik 2017-03-27 16:33:11 UTC
Description of problem:
Fail to run a VM when the cluster's emulated machine is also defined for the VM's  custom compatibility version because it is set with wrong emulated machine. We encountered this on rhev.tlv.
Severity is medium since it may happen with very specific configuration and has a simple workaround.

Version-Release number of selected component (if applicable):


How reproducible:
100%


Steps to Reproduce:
1. Define the cluster's emulated machine as showed below (additional info)
2. Create a VM in cluster 4.0 (architecture x86) with custom compatibility version of 3.6
3. Run the VM

Actual results:
The VM should run (with emulated machine = pc-i440fx-rhel7.2.0)

Expected results:
The VM fails to run (its emulated machine = pseries-rhel7.2.0)

Additional info:
engine=# select * from vdc_options where option_name ilike '%emulated%';
 option_id |       option_name       |                    option_value                     | version 
-----------+-------------------------+-----------------------------------------------------+---------
      1206 | ClusterEmulatedMachines | pc-i440fx-rhel7.2.0,pseries-rhel7.2.0               | 4.0
       900 | ClusterEmulatedMachines | pc-i440fx-rhel7.2.0,pseries-rhel7.2.0               | 3.6
      1294 | ClusterEmulatedMachines | pc-i440fx-rhel7.3.0,pc-i440fx-2.6,pseries-rhel7.3.0 | 4.1

Comment 1 Michal Skrivanek 2017-03-28 07:37:58 UTC
it seems not to be related to upgrade.
The bug allows to sneak an unsupported VM (with unsupported cluster compatibility) to be run.
Happened for 3.6 CCV after update of DC to 4.0 which then should allow only 4.0+ compatibility levels.

Comment 4 Michal Skrivanek 2017-03-31 13:40:56 UTC
*** Bug 1437882 has been marked as a duplicate of this bug. ***

Comment 5 Nisim Simsolo 2017-05-22 12:37:04 UTC
Verified:
ovirt-engine-4.1.2-0.1.el7
libvirt-client-2.0.0-10.el7_3.5.x86_64
sanlock-3.4.0-1.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.9.x86_64
vdsm-4.19.11-1.el7ev.x86_64