Add enabled_perf_events option for libvirt
Change-Id: Ia27e6831f3f6e9cdeaacb650039be5c81b90cb40
This commit is contained in:
parent
30f9d47ec4
commit
23ed480305
|
@ -63,6 +63,14 @@
|
|||
# number (integer value)
|
||||
# Defaults to -2
|
||||
#
|
||||
# [*libvirt_enabled_perf_events*]
|
||||
# (optional) This is a performance event list which could be used as monitor.
|
||||
# A string list. For example: ``enabled_perf_events = cmt, mbml, mbmt``
|
||||
# The supported events list can be found in
|
||||
# https://libvirt.org/html/libvirt-libvirt-domain.html ,
|
||||
# which you may need to search key words ``VIR_PERF_PARAM_*``
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*remove_unused_base_images*]
|
||||
# (optional) Should unused base images be removed?
|
||||
# If undef is specified, remove the line in nova.conf
|
||||
|
@ -126,6 +134,7 @@ class nova::compute::libvirt (
|
|||
$libvirt_inject_password = false,
|
||||
$libvirt_inject_key = false,
|
||||
$libvirt_inject_partition = -2,
|
||||
$libvirt_enabled_perf_events = $::os_service_default,
|
||||
$remove_unused_base_images = undef,
|
||||
$remove_unused_resized_minimum_age_seconds = undef,
|
||||
$remove_unused_original_minimum_age_seconds = undef,
|
||||
|
@ -192,16 +201,17 @@ class nova::compute::libvirt (
|
|||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/compute_driver': value => $compute_driver;
|
||||
'DEFAULT/preallocate_images': value => $preallocate_images;
|
||||
'vnc/vncserver_listen': value => $vncserver_listen;
|
||||
'libvirt/virt_type': value => $libvirt_virt_type;
|
||||
'libvirt/cpu_mode': value => $libvirt_cpu_mode_real;
|
||||
'libvirt/inject_password': value => $libvirt_inject_password;
|
||||
'libvirt/inject_key': value => $libvirt_inject_key;
|
||||
'libvirt/inject_partition': value => $libvirt_inject_partition;
|
||||
'libvirt/hw_disk_discard': value => $libvirt_hw_disk_discard;
|
||||
'libvirt/hw_machine_type': value => $libvirt_hw_machine_type;
|
||||
'DEFAULT/compute_driver': value => $compute_driver;
|
||||
'DEFAULT/preallocate_images': value => $preallocate_images;
|
||||
'vnc/vncserver_listen': value => $vncserver_listen;
|
||||
'libvirt/virt_type': value => $libvirt_virt_type;
|
||||
'libvirt/cpu_mode': value => $libvirt_cpu_mode_real;
|
||||
'libvirt/inject_password': value => $libvirt_inject_password;
|
||||
'libvirt/inject_key': value => $libvirt_inject_key;
|
||||
'libvirt/inject_partition': value => $libvirt_inject_partition;
|
||||
'libvirt/hw_disk_discard': value => $libvirt_hw_disk_discard;
|
||||
'libvirt/hw_machine_type': value => $libvirt_hw_machine_type;
|
||||
'libvirt/enabled_perf_events': value => $libvirt_enabled_perf_events;
|
||||
}
|
||||
|
||||
# cpu_model param is only valid if cpu_mode=custom
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- Expose enabled_perf_events option so it can be set in
|
||||
libvirt nova config. This is required for cache
|
||||
monitoring technologu feature to work end to end.
|
|
@ -70,6 +70,7 @@ describe 'nova::compute::libvirt' do
|
|||
:libvirt_disk_cachemodes => ['file=directsync','block=none'],
|
||||
:libvirt_hw_disk_discard => 'unmap',
|
||||
:libvirt_hw_machine_type => 'x86_64=machinetype1,armv7l=machinetype2',
|
||||
:libvirt_enabled_perf_events => ['cmt', 'mbml', 'mbmt'],
|
||||
:remove_unused_base_images => true,
|
||||
:remove_unused_resized_minimum_age_seconds => 3600,
|
||||
:remove_unused_original_minimum_age_seconds => 3600,
|
||||
|
@ -93,6 +94,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/disk_cachemodes').with_value('file=directsync,block=none')}
|
||||
it { is_expected.to contain_nova_config('libvirt/hw_disk_discard').with_value('unmap')}
|
||||
it { is_expected.to contain_nova_config('libvirt/hw_machine_type').with_value('x86_64=machinetype1,armv7l=machinetype2')}
|
||||
it { is_expected.to contain_nova_config('libvirt/enabled_perf_events').with_value('cmt,mbml,mbmt')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_base_images').with_value(true)}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_original_minimum_age_seconds').with_value(3600)}
|
||||
|
|
Loading…
Reference in New Issue