nova-compute sets wrong CPU capabilites => guest kernel Oops'es on boot
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Mirantis OpenStack | Status tracked in 10.0.x | |||||
10.0.x |
Fix Released
|
High
|
Alexei Sheplyakov | |||
5.1.x |
Won't Fix
|
High
|
Alexey Stupnikov | |||
6.0.x |
Won't Fix
|
High
|
Alexey Stupnikov | |||
6.1.x |
Fix Committed
|
High
|
Alexey Stupnikov | |||
7.0.x |
Fix Released
|
High
|
Alexey Stupnikov | |||
8.0.x |
Fix Committed
|
High
|
Alexey Stupnikov | |||
9.x |
Fix Released
|
High
|
Alexei Sheplyakov |
Bug Description
Steps To Reproduce:
1. Find a CPU which supports AVX2 instructions (such as Intel Core i7)
2. Install the kernel and qemu which can't handle AVX2 instructions in the guest mode (for instance, the ones shipped with Ubuntu 14.04)
3. Define a VM (via libvirt) with 'cpu_mode' parameter being 'host-model' (<cpu mode='host-model'> in the VM XML definition).
4. Boot the kernel which can make use of AVX2 instructions (such as Linux 4.4.x) in the VM
Expected result: the *guest* kernel boots
Actual result: the *guest* kernel panics during the boot while trying to execute an AVX2 instruction (see http://
Customer Impact:
Depending on the hardware Ubuntu 16.04 cloud images can be unusable "out of the box" on OpenStack clouds deployed with Fuel/MOS 9.0 (and earlier versions). Most likely the problem affects other kernels/drivers which make use of SIMD instructions
Note: there are at least 3 factors which influence the problem:
- the host CPU (should be more or less recent)
- the host kernel and qemu which can't handle some of the SIMD instructions in the guest mode
- the guest kernel (which makes use of those instructions)
The root cause is that libvirt specifies impossible combination of CPU model
and capabilities so the kernel Oops'es when trying to use the instructions which are reported as supported (when in reality they aren't).
Such a wrong CPU capabilities set is a result of <cpu mode='host-model'> in libvirt domain XML. This mode is documented to produce unexpected results
(http://
"Beware, due to the way libvirt detects host CPU and due to the fact libvirt does not talk to QEMU/KVM when creating the CPU model, CPU configuration created using host-model may not work as expected. The guest CPU may differ from the configuration and it may also confuse guest OS by using a combination of CPU features and other parameters (such as CPUID level) that don't work."
The wrong/inappropriate 'cpu mode' is set by Fuel in /etc/nova/
[libvirt]
inject_partition=-2
inject_
disk_cachemodes
cpu_mode=host-model
Fuel should not set a risky/problematic cpu_mode by default (it's better to leave this parameter unset).
tags: | added: area-linux |
description: | updated |
description: | updated |
description: | updated |
information type: | Public → Public Security |
information type: | Private Security → Public |
description: | updated |
tags: | added: on-verification |
no longer affects: | fuel-ccp |
Looks like Fuel misconfigures nova-compute so it reports wrong CPU capabilites (and the newer kernel tries to make use of them and Oopses).
Could you please try reproducing the problem with Ubuntu 14.04 *guest* running 4.4.0-x kernel?
Also what happens if you downgrade the kernel in xenial?