Support for libvirt volume multipath

Adds support for libvirt volume_use_multipath the ability to
use multipath connection of the iSCSI or FC volume.
Volumes can be connected in the LibVirt as multipath devices.
Adds new parameter "nova::compute::libvirt::volume_use_multipath"

Change-Id: I029ee781caf17c83b6a7d3044f1d18450150cefb
This commit is contained in:
rajinir 2018-09-27 14:52:12 -05:00 committed by Alex Schultz
parent c495e7fb0c
commit 50797656a6
3 changed files with 18 additions and 0 deletions

View File

@ -151,6 +151,12 @@
# (optional) Available capacity in MiB for file-backed memory.
# Defaults to $::os_service_default
#
# [*volume_use_multipath*]
# (optional) Use multipath connection of the
# iSCSI or FC volume. Volumes can be connected in the
# LibVirt as multipath devices.
# Defaults to $::os_service_default
#
class nova::compute::libvirt (
$ensure_package = 'present',
$libvirt_virt_type = 'kvm',
@ -180,6 +186,7 @@ class nova::compute::libvirt (
$rx_queue_size = $::os_service_default,
$tx_queue_size = $::os_service_default,
$file_backed_memory = undef,
$volume_use_multipath = $::os_service_default,
) inherits nova::params {
include ::nova::deps
@ -262,6 +269,7 @@ class nova::compute::libvirt (
'libvirt/rx_queue_size': value => $rx_queue_size;
'libvirt/tx_queue_size': value => $tx_queue_size;
'libvirt/file_backed_memory': value => $file_backed_memory;
'libvirt/volume_use_multipath': value => $volume_use_multipath;
}
# cpu_model param is only valid if cpu_mode=custom

View File

@ -0,0 +1,7 @@
---
features:
- |
Add support for libvirt volume_use_multipath the ability to
use multipath connection of the iSCSI or FC volume.
Volumes can be connected in the LibVirt as multipath devices.
Adds new parameter "nova::compute::libvirt::volume_use_multipath"

View File

@ -64,6 +64,7 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_nova_config('libvirt/remove_unused_resized_minimum_age_seconds').with_ensure('absent')}
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>')}
it { is_expected.to contain_nova_config('libvirt/volume_use_multipath').with_value('<SERVICE DEFAULT>')}
end
describe 'with params' do
@ -90,6 +91,7 @@ describe 'nova::compute::libvirt' do
:log_outputs => '1:file:/var/log/libvirt/libvirtd.log',
:rx_queue_size => 512,
:tx_queue_size => 1024,
:volume_use_multipath => false,
}
end
@ -115,6 +117,7 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_libvirtd_config('log_outputs').with_value("\"#{params[:log_outputs]}\"")}
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)}
it { is_expected.to contain_nova_config('libvirt/volume_use_multipath').with_value(false)}
it {
is_expected.to contain_service('libvirt').with(
:name => 'custom_service',