Bug 1931514

Summary: [downstream] Cluster upgrade fails when using Intel Skylake Client/Server IBRS SSBD MDS Family
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Orti <jortialc>
Component: ovirt-engineAssignee: Lucia Jelinkova <ljelinko>
Status: CLOSED ERRATA QA Contact: Qin Yuan <qiyuan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.3CC: ahadas, bugs, ljelinko, mavital
Target Milestone: ovirt-4.4.5   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.5.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1930733 Environment:
Last Closed: 2021-04-14 11:40:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1930733    
Bug Blocks:    

Description Juan Orti 2021-02-22 15:33:56 UTC
+++ This bug was initially created as a clone of Bug #1930733 +++

Description of problem:
When upgrading a cluster with Intel Skylake Client/Server IBRS SSBD MDS Family from the UI, the upgrade fails on updating the VMs with the following error:

Validation of action 'UpdateVm' failed for user a. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM,CPU_TYPE_UNKNOWN

Steps to Reproduce:
1. Create Cluster with compatibility version 4.3 and CPU Intel Skylake Client IBRS SSBD MDS Family or Intel Skylake Server IBRS SSBD MDS Family
2.Add vm
3.Open Edit Cluster dialog and change the compatibility version to 4.4 (or 4.5) and save the dialog.

Actual results:
Error occurs

Expected results:
Upgrade succeedes

Additional info:
There are two problems here - frontend and backend. 
1. Frontend - when changing the compatibility version dropdown, the new cpu definitions are loaded into the cpu dropdown. The selected value is calculated based on the flags of the original cpu (in 4.3). However, the flags have changed from vmx,spec_ctrl,ssbd,md_clear,model_Skylake-Server to vmx,ssbd,md_clear,model_Skylake-Server-noTSX-IBRS. As a result, the CPU is not found and the "Auto detect" is selected in the dropdown and sent to the backend.
2. Backend - there is no validation that prevents from selecting Auto detect when there already are VMs or hosts in the cluster. So the null value (Auto detect) is sent to UpdateVmCommand that fails correctly because there is no such CPU. However, the cluster command fails with general exception that the update vm failed and it could be quite demanding to find the exact cause. It is much more simple to add the validation to cluster command.

Comment 4 Qin Yuan 2021-03-11 07:06:50 UTC
Verified with:
ovirt-engine-4.4.5.9-0.1.el8ev.noarch

Steps:
1. Create a Data Center with compatibility Version 4.3
2. Test Intel Skylake Server IBRS SSBD MDS Family:
   1) Add a Cluster with Compatibility Version 4.3, CPU Intel Skylake Server IBRS SSBD MDS Family
   2) Add host, storage, vm
   3) Open Edit Cluster dialog, change Compatibility Version to 4.4, and save the dialog
3. Test Intel Skylake Client IBRS SSBD MDS Family:
   1) Add a Cluster with Compatibility Version 4.3, CPU Intel Skylake Client IBRS SSBD MDS Family
   2) Add host, storage, vm
   3) Open Edit Cluster dialog, change Compatibility Version to 4.5, and save the dialog


Results:
1. Test Intel Skylake Server IBRS SSBD MDS Family:
   1) On Edit Cluster dialog, CPU Type is changed to Secure Intel Skylake Server Family when changing Compatibility Version to 4.4
   2) Update cluster succeeds.
2. Test Intel Skylake Client IBRS SSBD MDS Family:
   1) On Edit Cluster dialog, CPU Type is changed to Secure Intel Skylake Client Family when changing Compatibility Version to 4.5
   2) Update cluster succeeds.

Comment 9 errata-xmlrpc 2021-04-14 11:40:42 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 (Moderate: RHV Manager (ovirt-engine) 4.4.z [ovirt-4.4.5] security, bug fix, enhancement), 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-2021:1169