Add ports filtering support to XtremIO Cinder driver

If there are some iSCSI or FC targets (ESXi for example) that
are not connected to the OpenStack host,
attach volume operation waits until timeout.
The XtremIO Cinder driver needs a new option to support ports
filtering.

Depends-On: https://review.opendev.org/#/c/775798
Related-Bug: #1915800
Change-Id: I5d4934549de9350b8816d688ce8526dbc5d0f603
This commit is contained in:
Ivan Pchelintsev 2021-02-17 22:53:38 +03:00
parent b420a5e7f4
commit cc8665d473
4 changed files with 21 additions and 0 deletions

View File

@ -38,6 +38,11 @@
# (optional) Number of volumes created from each cached glance image.
# Defaults to 100
#
# [*xtremio_ports*]
# (optional) Allowed ports. Comma separated list of XtremIO iSCSI IPs or
# FC WWNs (ex. 58:cc:f0:98:49:22:07:02) to be used. If is not set all ports
# are allowed.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {}
@ -68,6 +73,7 @@ define cinder::backend::dellemc_xtremio (
$xtremio_volumes_per_glance_cache = 100,
$manage_volume_type = false,
$xtremio_storage_protocol = 'iSCSI',
$xtremio_ports = $::os_service_default,
$extra_options = {},
) {
@ -94,6 +100,7 @@ define cinder::backend::dellemc_xtremio (
"${name}/xtremio_array_busy_retry_count": value => $xtremio_array_busy_retry_count;
"${name}/xtremio_array_busy_retry_interval": value => $xtremio_array_busy_retry_interval;
"${name}/xtremio_volumes_per_glance_cache": value => $xtremio_volumes_per_glance_cache;
"${name}/xtremio_ports": value => $xtremio_ports;
}

View File

@ -38,6 +38,11 @@
# (optional) Number of volumes created from each cached glance image.
# Defaults to 100
#
# [*xtremio_ports*]
# (optional) Allowed ports. Comma separated list of XtremIO iSCSI IPs or
# FC WWNs (ex. 58:cc:f0:98:49:22:07:02) to be used. If is not set all ports
# are allowed.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza.
# Defaults to: {}
@ -61,6 +66,7 @@ define cinder::backend::dellemc_xtremio_iscsi (
$xtremio_array_busy_retry_interval = 5,
$xtremio_volumes_per_glance_cache = 100,
$manage_volume_type = false,
$xtremio_ports = $::os_service_default,
$extra_options = {},
) {
@ -81,6 +87,7 @@ please use cinder::backend::dellemc_xtremio resource instead.')
"${name}/xtremio_array_busy_retry_count": value => $xtremio_array_busy_retry_count;
"${name}/xtremio_array_busy_retry_interval": value => $xtremio_array_busy_retry_interval;
"${name}/xtremio_volumes_per_glance_cache": value => $xtremio_volumes_per_glance_cache;
"${name}/xtremio_ports": value => $xtremio_ports;
}

View File

@ -0,0 +1,5 @@
---
fixes:
- |
`Bug #1915800 <https://bugs.launchpad.net/cinder/+bug/1915800>`_:
Add support for ports filtering in XtremIO driver.

View File

@ -20,6 +20,7 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
:xtremio_array_busy_retry_count => 5,
:xtremio_array_busy_retry_interval => 5,
:xtremio_volumes_per_glance_cache => 100,
:xtremio_ports => '<SERVICE DEFAULT>',
}
end
@ -29,6 +30,7 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
:xtremio_array_busy_retry_count => 15,
:xtremio_array_busy_retry_interval => 25,
:xtremio_volumes_per_glance_cache => 10,
:xtremio_ports => '10.10.57.45,10.10.57.46',
}
end