Add support for [libvirt] device_detach_attempts/timeout
This change introduces support for two new parameters of libvirt driver which were added recently by [1]. [1] e56cc4f439846558fc13298c2360d7cdd473cc89 Change-Id: I9cfed69c130e7fc5457d2474d0e96f542b2f42ab
This commit is contained in:
parent
ee78d8557f
commit
87d5deeb9a
@ -87,6 +87,17 @@
|
||||
# which you may need to search key words ``VIR_PERF_PARAM_*``
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*device_detach_attempts*]
|
||||
# (optional) Maximum number of attempts the driver tries to detach a device
|
||||
# in libvirt.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*device_detach_timeout*]
|
||||
# (optional) Maximum number of seconds the driver waits for the success or
|
||||
# the failure event from libvirt for a given device detach attempt before
|
||||
# it re-trigger the detach.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*libvirt_service_name*]
|
||||
# (optional) libvirt service name.
|
||||
# Defaults to $::nova::params::libvirt_service_name
|
||||
@ -232,6 +243,8 @@ class nova::compute::libvirt (
|
||||
$inject_key = false,
|
||||
$inject_partition = -2,
|
||||
$enabled_perf_events = $::os_service_default,
|
||||
$device_detach_attempts = $::os_service_default,
|
||||
$device_detach_timeout = $::os_service_default,
|
||||
$libvirt_service_name = $::nova::params::libvirt_service_name,
|
||||
$virtlock_service_name = $::nova::params::virtlock_service_name,
|
||||
$virtlog_service_name = $::nova::params::virtlog_service_name,
|
||||
@ -396,6 +409,8 @@ class nova::compute::libvirt (
|
||||
'libvirt/hw_disk_discard': value => $hw_disk_discard;
|
||||
'libvirt/hw_machine_type': value => $hw_machine_type;
|
||||
'libvirt/enabled_perf_events': value => join(any2array($enabled_perf_events), ',');
|
||||
'libvirt/device_detach_attempts': value => $device_detach_attempts;
|
||||
'libvirt/device_detach_timeout': value => $device_detach_timeout;
|
||||
'libvirt/rx_queue_size': value => $rx_queue_size;
|
||||
'libvirt/tx_queue_size': value => $tx_queue_size;
|
||||
'libvirt/file_backed_memory': value => $file_backed_memory;
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now the ``nova::compute::libvirt`` class supports the following two
|
||||
parameters.
|
||||
|
||||
- ``device_detach_attempts``
|
||||
- ``device_detach_timeout``
|
@ -57,6 +57,9 @@ describe 'nova::compute::libvirt' do
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_password').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_key').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_partition').with_value(-2)}
|
||||
it { is_expected.to contain_nova_config('libvirt/enabled_perf_events').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_attempts').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_timeout').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('libvirt/rx_queue_size').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/tx_queue_size').with_value('<SERVICE DEFAULT>')}
|
||||
@ -90,6 +93,8 @@ describe 'nova::compute::libvirt' do
|
||||
:hw_disk_discard => 'unmap',
|
||||
:hw_machine_type => 'x86_64=machinetype1,armv7l=machinetype2',
|
||||
:enabled_perf_events => ['cmt', 'mbml', 'mbmt'],
|
||||
:device_detach_attempts => 8,
|
||||
:device_detach_timeout => 20,
|
||||
:libvirt_service_name => 'custom_service',
|
||||
:virtlock_service_name => 'virtlock',
|
||||
:virtlog_service_name => 'virtlog',
|
||||
@ -131,6 +136,8 @@ describe 'nova::compute::libvirt' do
|
||||
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('libvirt/device_detach_attempts').with_value(8)}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_timeout').with_value(20)}
|
||||
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('libvirt/rx_queue_size').with_value(512)}
|
||||
it { is_expected.to contain_nova_config('libvirt/tx_queue_size').with_value(1024)}
|
||||
@ -273,6 +280,9 @@ describe 'nova::compute::libvirt' do
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_key').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_partition').with_value(-2)}
|
||||
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('libvirt/enabled_perf_events').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_attempts').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_timeout').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/nfs_mount_options').with_value('<SERVICE DEFAULT>')}
|
||||
end
|
||||
|
||||
@ -281,6 +291,8 @@ describe 'nova::compute::libvirt' do
|
||||
{ :virt_type => 'qemu',
|
||||
:vncserver_listen => '0.0.0.0',
|
||||
:enabled_perf_events => ['cmt', 'mbml', 'mbmt'],
|
||||
:device_detach_attempts => 8,
|
||||
:device_detach_timeout => 20,
|
||||
:nfs_mount_options => 'rw,intr,nolock',
|
||||
:mem_stats_period_seconds => 20,
|
||||
}
|
||||
@ -289,6 +301,8 @@ describe 'nova::compute::libvirt' do
|
||||
it { is_expected.to contain_nova_config('libvirt/virt_type').with_value('qemu')}
|
||||
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('libvirt/enabled_perf_events').with_value('cmt,mbml,mbmt')}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_attempts').with_value(8)}
|
||||
it { is_expected.to contain_nova_config('libvirt/device_detach_timeout').with_value(20)}
|
||||
it { is_expected.to contain_nova_config('libvirt/nfs_mount_options').with_value('rw,intr,nolock')}
|
||||
it { is_expected.to contain_nova_config('libvirt/mem_stats_period_seconds').with_value(20)}
|
||||
it { is_expected.to contain_package('libvirt').with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user