Dell EMC SC: Add use_multipath_for_image_xfer

This change implements the documented best practice to use multipath
with a Cinder deployment by setting a Cinder configuration setting
to ensure that multipath is appropriately used by the Dell EMC
SC iSCSI driver.

Change-Id: Ie50e29bd96471110a3738e3fcccfb8af37cd31be
This commit is contained in:
rajinir 2018-09-27 14:14:24 -05:00
parent dd23fe6bbb
commit 72035c5e3c
3 changed files with 53 additions and 38 deletions

View File

@ -74,24 +74,29 @@
# with volume_backend_name=$volume_backend_name key/value.
# Defaults to false.
#
# [*use_multipath_for_image_xfer*]
# (Optional) Enables multipath configuration.
# Defaults to true.
#
define cinder::backend::dellsc_iscsi (
$san_ip,
$san_login,
$san_password,
$iscsi_ip_address,
$dell_sc_ssn,
$volume_backend_name = $name,
$dell_sc_api_port = $::os_service_default,
$dell_sc_server_folder = 'srv',
$dell_sc_verify_cert = $::os_service_default,
$dell_sc_volume_folder = 'vol',
$iscsi_port = $::os_service_default,
$excluded_domain_ip = $::os_service_default,
$secondary_san_ip = $::os_service_default,
$secondary_san_login = $::os_service_default,
$secondary_san_password = $::os_service_default,
$secondary_sc_api_port = $::os_service_default,
$manage_volume_type = false,
$volume_backend_name = $name,
$dell_sc_api_port = $::os_service_default,
$dell_sc_server_folder = 'srv',
$dell_sc_verify_cert = $::os_service_default,
$dell_sc_volume_folder = 'vol',
$iscsi_port = $::os_service_default,
$excluded_domain_ip = $::os_service_default,
$secondary_san_ip = $::os_service_default,
$secondary_san_login = $::os_service_default,
$secondary_san_password = $::os_service_default,
$secondary_sc_api_port = $::os_service_default,
$manage_volume_type = false,
$use_multipath_for_image_xfer = true,
$extra_options = {},
) {
@ -109,22 +114,23 @@ default of \"vol\" and will be changed to the upstream OpenStack default in N-re
$driver = 'dell_emc.sc.storagecenter_iscsi.SCISCSIDriver'
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/dell_sc_ssn": value => $dell_sc_ssn;
"${name}/dell_sc_api_port": value => $dell_sc_api_port;
"${name}/dell_sc_server_folder": value => $dell_sc_server_folder;
"${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert;
"${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder;
"${name}/iscsi_port": value => $iscsi_port;
"${name}/secondary_san_ip": value => $secondary_san_ip;
"${name}/secondary_san_login": value => $secondary_san_login;
"${name}/secondary_san_password": value => $secondary_san_password, secret => true;
"${name}/secondary_sc_api_port": value => $secondary_sc_api_port;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/dell_sc_ssn": value => $dell_sc_ssn;
"${name}/dell_sc_api_port": value => $dell_sc_api_port;
"${name}/dell_sc_server_folder": value => $dell_sc_server_folder;
"${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert;
"${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder;
"${name}/iscsi_port": value => $iscsi_port;
"${name}/secondary_san_ip": value => $secondary_san_ip;
"${name}/secondary_san_login": value => $secondary_san_login;
"${name}/secondary_san_password": value => $secondary_san_password, secret => true;
"${name}/secondary_sc_api_port": value => $secondary_sc_api_port;
"${name}/use_multipath_for_image_xfer": value => $use_multipath_for_image_xfer;
}
if $excluded_domain_ip {

View File

@ -0,0 +1,7 @@
---
features:
- Added Dell EMC SC multipath support
This change implements the documented best practice to use multipath
with a Cinder deployment by setting a Cinder configuration setting
to ensure that multipath is appropriately used by the Dell EMC
SC iSCSI driver. Multipath is true by default.

View File

@ -18,16 +18,17 @@ describe 'cinder::backend::dellsc_iscsi' do
let :default_params do
{
:dell_sc_api_port => '<SERVICE DEFAULT>',
:dell_sc_server_folder => 'srv',
:dell_sc_verify_cert => '<SERVICE DEFAULT>',
:dell_sc_volume_folder => 'vol',
:iscsi_port => '<SERVICE DEFAULT>',
:excluded_domain_ip => '<SERVICE DEFAULT>',
:secondary_san_ip => '<SERVICE DEFAULT>',
:secondary_san_login => '<SERVICE DEFAULT>',
:secondary_san_password => '<SERVICE DEFAULT>',
:secondary_sc_api_port => '<SERVICE DEFAULT>',
:dell_sc_api_port => '<SERVICE DEFAULT>',
:dell_sc_server_folder => 'srv',
:dell_sc_verify_cert => '<SERVICE DEFAULT>',
:dell_sc_volume_folder => 'vol',
:iscsi_port => '<SERVICE DEFAULT>',
:excluded_domain_ip => '<SERVICE DEFAULT>',
:secondary_san_ip => '<SERVICE DEFAULT>',
:secondary_san_login => '<SERVICE DEFAULT>',
:secondary_san_password => '<SERVICE DEFAULT>',
:secondary_sc_api_port => '<SERVICE DEFAULT>',
:use_multipath_for_image_xfer => 'true',
}
end
@ -47,6 +48,7 @@ describe 'cinder::backend::dellsc_iscsi' do
end
is_expected.to contain_cinder_config("#{config_group_name}/volume_driver").with_value(
'cinder.volume.drivers.dell_emc.sc.storagecenter_iscsi.SCISCSIDriver')
is_expected.to contain_cinder_config("#{config_group_name}/use_multipath_for_image_xfer").with_value('true')
end
end