Merge "Set cpu_mode to "none" when virt_type is qemu"

This commit is contained in:
Jenkins 2016-12-15 15:29:07 +00:00 committed by Gerrit Code Review
commit 487a812e7c
4 changed files with 27 additions and 3 deletions

View File

@ -24,8 +24,8 @@
# [*libvirt_cpu_mode*]
# (optional) The libvirt CPU mode to configure. Possible values
# include custom, host-model, none, host-passthrough.
# Defaults to 'host-model' if libvirt_virt_type is set to either
# kvm or qemu, otherwise defaults to 'none'.
# Defaults to 'host-model' if libvirt_virt_type is set to kvm,
# otherwise defaults to 'none'.
#
# [*libvirt_cpu_model*]
# (optional) The named libvirt CPU model (see names listed in
@ -137,7 +137,7 @@ class nova::compute::libvirt (
# libvirt_cpu_mode has different defaults depending on hypervisor.
if !$libvirt_cpu_mode {
case $libvirt_virt_type {
'kvm','qemu': {
'kvm': {
$libvirt_cpu_mode_real = 'host-model'
}
default: {

View File

@ -0,0 +1,10 @@
---
upgrade:
- The default value for nova::compute::libvirt::libvirt_cpu_mode
when nova::compute::libvirt::libvirt_virt_type is set to 'qemu'
has been changed from 'host-model' to 'none'. The Nova gate
does not really test the 'host-model' option in their CI, but
'none' due to Devstack configuration, and it is known to create
issues with QEMU 2.6 (see
https://bugzilla.redhat.com/show_bug.cgi?id=1404627).

View File

@ -69,6 +69,12 @@ describe 'basic nova' do
virtlock_service_name => false,
virtlog_service_name => false,
}
# FIXME(jpena): this is only here to avoid an attempted downgrade
# of qemu-kvm-ev. Remove after https://review.openstack.org/411179
# is merged
if $::osfamily == 'RedHat' {
Package['qemu-kvm-ev'] -> Class['nova::compute::libvirt::services']
}
class { '::nova::scheduler': }
class { '::nova::vncproxy': }

View File

@ -125,6 +125,14 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_nova_config('libvirt/cpu_model').with_value('kvm64')}
end
describe 'with qemu as virt_type' do
let :params do
{ :libvirt_virt_type => 'qemu' }
end
it { is_expected.to contain_nova_config('libvirt/cpu_mode').with_value('none')}
end
describe 'with migration_support enabled' do
context 'with vncserver_listen set to 0.0.0.0' do