Add ability to configure backend availability zones

Add new "backend_availability_zone" parameter to every volume
backend. The parameters are optional, and when set they override the
DEFAULT/storage_availability_zone for the corresponding backend.

Implements: blueprint split-controlplane-cinder-volume-az
Change-Id: I11821a38d8ba5afc594b3d601cd1634207a6f093
This commit is contained in:
Alan Bishop 2018-10-03 14:19:48 -04:00
parent 4aaac7a5b4
commit a96f912c0c
53 changed files with 596 additions and 271 deletions

View File

@ -16,6 +16,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.block_device.BlockDeviceDriver'.
@ -66,15 +72,16 @@
define cinder::backend::bdd (
$iscsi_ip_address,
$available_devices,
$volume_backend_name = $name,
$volume_driver = 'cinder.volume.drivers.block_device.BlockDeviceDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$iscsi_helper = 'tgtadm',
$iscsi_protocol = $::os_service_default,
$volume_clear = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.block_device.BlockDeviceDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$iscsi_helper = 'tgtadm',
$iscsi_protocol = $::os_service_default,
$volume_clear = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
) {
include ::cinder::deps
@ -86,15 +93,16 @@ define cinder::backend::bdd (
cinder_config {
"${name}/available_devices": value => $available_devices;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper;
"${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir;
"${name}/iscsi_protocol": value => $iscsi_protocol;
"${name}/volume_clear": value => $volume_clear;
"${name}/available_devices": value => $available_devices;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper;
"${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir;
"${name}/iscsi_protocol": value => $iscsi_protocol;
"${name}/volume_clear": value => $volume_clear;
}
if $manage_volume_type {

View File

@ -20,6 +20,12 @@
# (optional) The storage backend name.
# Defaults to the $name of the backend
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*unity_io_ports*]
# (optional) A comma-separated list of iSCSI or FC ports to be used.
# Each port can be Unix-style glob expressions. The Unity Unisphere API port.
@ -46,26 +52,28 @@ define cinder::backend::dellemc_unity (
$san_login,
$san_password,
$storage_protocol,
$volume_backend_name = $name,
$unity_io_ports = $::os_service_default,
$unity_storage_pool_names = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$unity_io_ports = $::os_service_default,
$unity_storage_pool_names = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
) {
include ::cinder::deps
$driver = 'dell_emc.unity.Driver'
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}/storage_protocol": value => $storage_protocol;
"${name}/unity_io_ports": value => $unity_io_ports;
"${name}/unity_storage_pool_names": value => $unity_storage_pool_names;
}
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${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}/storage_protocol": value => $storage_protocol;
"${name}/unity_io_ports": value => $unity_io_ports;
"${name}/unity_storage_pool_names": value => $unity_storage_pool_names;
}
if $manage_volume_type {
cinder_type { $volume_backend_name:

View File

@ -10,6 +10,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*cinder_emc_config_file*]
# (required) File path of Dell EMC VMAX ISCSI specific configuration file.
#
@ -32,6 +38,7 @@
define cinder::backend::dellemc_vmax_iscsi (
$cinder_emc_config_file,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {},
$volume_driver = 'cinder.volume.drivers.dell_emc.vmax.iscsi.VMAXISCSIDriver',
$manage_volume_type = false,
@ -42,6 +49,7 @@ define cinder::backend::dellemc_vmax_iscsi (
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/cinder_emc_config_file": value => $cinder_emc_config_file;
}

View File

@ -20,6 +20,12 @@
# (optional) The storage backend name.
# Defaults to the name of the backend
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*xtremio_array_busy_retry_count*]
# (optional) Number of retries in case array is busy.
# Defaults to 5
@ -50,6 +56,7 @@ define cinder::backend::dellemc_xtremio_iscsi (
$san_password,
$xtremio_cluster_name,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$xtremio_array_busy_retry_count = 5,
$xtremio_array_busy_retry_interval = 5,
$xtremio_volumes_per_glance_cache = 100,
@ -62,6 +69,7 @@ define cinder::backend::dellemc_xtremio_iscsi (
$driver = 'dell_emc.xtremio.XtremIOISCSIDriver'
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;

View File

@ -23,6 +23,12 @@
# (optional) The storage backend name.
# Defaults to the name of the backend
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*dell_sc_api_port*]
# (optional) The Enterprise Manager API port.
# Defaults to $::os_service_default
@ -85,6 +91,7 @@ define cinder::backend::dellsc_iscsi (
$iscsi_ip_address,
$dell_sc_ssn,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$dell_sc_api_port = $::os_service_default,
$dell_sc_server_folder = 'srv',
$dell_sc_verify_cert = $::os_service_default,
@ -97,7 +104,7 @@ define cinder::backend::dellsc_iscsi (
$secondary_sc_api_port = $::os_service_default,
$manage_volume_type = false,
$use_multipath_for_image_xfer = true,
$extra_options = {},
$extra_options = {},
) {
include ::cinder::deps
@ -115,6 +122,7 @@ 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}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;

View File

@ -10,6 +10,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*san_ip*]
# (required) IP address of SAN controller.
#
@ -87,6 +93,7 @@ define cinder::backend::emc_vnx (
$package_ensure = 'present',
$san_login = 'admin',
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {},
$volume_driver = 'cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver',
$storage_protocol = 'iscsi',
@ -116,6 +123,7 @@ define cinder::backend::emc_vnx (
"${name}/san_password": value => $san_password, secret => true;
"${name}/storage_vnx_pool_names": value => $storage_vnx_pool_names_real;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/storage_protocol": value => $storage_protocol;
"${name}/initiator_auto_registration": value => $initiator_auto_registration;

View File

@ -26,6 +26,12 @@
# (optional) The backend name.
# Defaults to the name of the resource
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*eqlx_group_name*]
# (optional) The CLI prompt message without '>'.
# Defaults to $::os_service_default
@ -69,18 +75,19 @@ define cinder::backend::eqlx (
$san_ip,
$san_login,
$san_password,
$san_private_key = $::os_service_default,
$san_thin_provision = $::os_service_default,
$volume_backend_name = $name,
$eqlx_group_name = $::os_service_default,
$eqlx_pool = $::os_service_default,
$eqlx_cli_max_retries = $::os_service_default,
$extra_options = {},
$chap_username = $::os_service_default,
$chap_password = $::os_service_default,
$use_chap_auth = $::os_service_default,
$ssh_conn_timeout = $::os_service_default,
$manage_volume_type = false,
$san_private_key = $::os_service_default,
$san_thin_provision = $::os_service_default,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$eqlx_group_name = $::os_service_default,
$eqlx_pool = $::os_service_default,
$eqlx_cli_max_retries = $::os_service_default,
$extra_options = {},
$chap_username = $::os_service_default,
$chap_password = $::os_service_default,
$use_chap_auth = $::os_service_default,
$ssh_conn_timeout = $::os_service_default,
$manage_volume_type = false,
) {
include ::cinder::deps
@ -94,18 +101,19 @@ define cinder::backend::eqlx (
}
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => 'cinder.volume.drivers.dell_emc.ps.PSSeriesISCSIDriver';
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/san_private_key": value => $san_private_key;
"${name}/san_thin_provision": value => $san_thin_provision;
"${name}/eqlx_group_name": value => $eqlx_group_name;
"${name}/use_chap_auth": value => $use_chap_auth;
"${name}/ssh_conn_timeout": value => $ssh_conn_timeout;
"${name}/eqlx_cli_max_retries": value => $eqlx_cli_max_retries;
"${name}/eqlx_pool": value => $eqlx_pool;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.dell_emc.ps.PSSeriesISCSIDriver';
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/san_private_key": value => $san_private_key;
"${name}/san_thin_provision": value => $san_thin_provision;
"${name}/eqlx_group_name": value => $eqlx_group_name;
"${name}/use_chap_auth": value => $use_chap_auth;
"${name}/ssh_conn_timeout": value => $ssh_conn_timeout;
"${name}/eqlx_cli_max_retries": value => $eqlx_cli_max_retries;
"${name}/eqlx_pool": value => $eqlx_pool;
}
if $manage_volume_type {

View File

@ -13,6 +13,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*glusterfs_backup_mount_point*]
# (optional) Base dir containing mount point for gluster share.
# Defaults to $::os_service_default
@ -56,6 +62,7 @@
define cinder::backend::glusterfs (
$glusterfs_shares,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$glusterfs_backup_mount_point = $::os_service_default,
$glusterfs_backup_share = $::os_service_default,
$glusterfs_sparsed_volumes = $::os_service_default,
@ -76,14 +83,14 @@ define cinder::backend::glusterfs (
}
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value =>
'cinder.volume.drivers.glusterfs.GlusterfsDriver';
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.glusterfs.GlusterfsDriver';
"${name}/glusterfs_backup_mount_point": value => $glusterfs_backup_mount_point;
"${name}/glusterfs_backup_share": value => $glusterfs_backup_share;
"${name}/glusterfs_shares_config": value => $glusterfs_shares_config;
"${name}/glusterfs_sparsed_volumes": value => $glusterfs_sparsed_volumes;
"${name}/glusterfs_mount_point_base": value => $glusterfs_mount_point_base;
"${name}/glusterfs_backup_share": value => $glusterfs_backup_share;
"${name}/glusterfs_shares_config": value => $glusterfs_shares_config;
"${name}/glusterfs_sparsed_volumes": value => $glusterfs_sparsed_volumes;
"${name}/glusterfs_mount_point_base": value => $glusterfs_mount_point_base;
}
if $manage_volume_type {

View File

@ -64,6 +64,12 @@
# (optional) SSH port to use to connect to NAS system.
# Defaults to $::os_service_default
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created
@ -86,18 +92,19 @@
#
define cinder::backend::gpfs (
$gpfs_mount_point_base,
$gpfs_images_dir = $::os_service_default,
$gpfs_images_share_mode = $::os_service_default,
$gpfs_max_clone_depth = $::os_service_default,
$gpfs_sparse_volumes = $::os_service_default,
$gpfs_storage_pool = $::os_service_default,
$nas_host = $::os_service_default,
$nas_login = $::os_service_default,
$nas_password = $::os_service_default,
$nas_private_key = $::os_service_default,
$nas_ssh_port = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
$gpfs_images_dir = $::os_service_default,
$gpfs_images_share_mode = $::os_service_default,
$gpfs_max_clone_depth = $::os_service_default,
$gpfs_sparse_volumes = $::os_service_default,
$gpfs_storage_pool = $::os_service_default,
$nas_host = $::os_service_default,
$nas_login = $::os_service_default,
$nas_password = $::os_service_default,
$nas_private_key = $::os_service_default,
$nas_ssh_port = $::os_service_default,
$backend_availability_zone = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
) {
include ::cinder::deps
@ -110,19 +117,19 @@ define cinder::backend::gpfs (
}
cinder_config {
"${name}/volume_driver":
value => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver';
"${name}/gpfs_max_clone_depth": value => $gpfs_max_clone_depth;
"${name}/gpfs_mount_point_base": value => $gpfs_mount_point_base;
"${name}/gpfs_sparse_volumes": value => $gpfs_sparse_volumes;
"${name}/gpfs_storage_pool": value => $gpfs_storage_pool;
"${name}/gpfs_images_share_mode": value => $gpfs_images_share_mode;
"${name}/gpfs_images_dir": value => $gpfs_images_dir;
"${name}/nas_host": value => $nas_host;
"${name}/nas_login": value => $nas_login;
"${name}/nas_password": value => $nas_password, secret => true;
"${name}/nas_private_key": value => $nas_private_key;
"${name}/nas_ssh_port": value => $nas_ssh_port;
"${name}/volume_driver": value => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver';
"${name}/gpfs_max_clone_depth": value => $gpfs_max_clone_depth;
"${name}/gpfs_mount_point_base": value => $gpfs_mount_point_base;
"${name}/gpfs_sparse_volumes": value => $gpfs_sparse_volumes;
"${name}/gpfs_storage_pool": value => $gpfs_storage_pool;
"${name}/gpfs_images_share_mode": value => $gpfs_images_share_mode;
"${name}/gpfs_images_dir": value => $gpfs_images_dir;
"${name}/nas_host": value => $nas_host;
"${name}/nas_login": value => $nas_login;
"${name}/nas_password": value => $nas_password, secret => true;
"${name}/nas_private_key": value => $nas_private_key;
"${name}/nas_ssh_port": value => $nas_ssh_port;
"${name}/backend_availability_zone": value => $backend_availability_zone;
}
if $manage_volume_type {

View File

@ -31,6 +31,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (optional) Setup cinder-volume to use HPE 3par volume driver.
# Defaults to 'cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver'
@ -75,6 +81,7 @@ define cinder::backend::hpe3par_iscsi(
$san_password,
$hpe3par_iscsi_ips,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver',
$hpe3par_iscsi_chap_enabled = false,
$hpe3par_cpg_snap = 'userCPG',
@ -92,6 +99,7 @@ define cinder::backend::hpe3par_iscsi(
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/hpe3par_username": value => $hpe3par_username;
"${name}/hpe3par_password": value => $hpe3par_password, secret => true;

View File

@ -16,6 +16,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (optional) Setup cinder-volume to use HPE LeftHand volume driver.
# Defaults to 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver'
@ -47,6 +53,7 @@ define cinder::backend::hpelefthand_iscsi(
$hpelefthand_password,
$hpelefthand_clustername,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver',
$hpelefthand_iscsi_chap_enabled = false,
$hpelefthand_debug = false,
@ -58,6 +65,7 @@ define cinder::backend::hpelefthand_iscsi(
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/hpelefthand_username": value => $hpelefthand_username;
"${name}/hpelefthand_password": value => $hpelefthand_password, secret => true;

View File

@ -10,6 +10,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'.
@ -44,14 +50,15 @@
#
define cinder::backend::iscsi (
$iscsi_ip_address,
$volume_backend_name = $name,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$iscsi_helper = $::cinder::params::iscsi_helper,
$iscsi_protocol = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$iscsi_helper = $::cinder::params::iscsi_helper,
$iscsi_protocol = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
) {
include ::cinder::deps
@ -67,13 +74,14 @@ define cinder::backend::iscsi (
}
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper;
"${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir;
"${name}/iscsi_protocol": value => $iscsi_protocol;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper;
"${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir;
"${name}/iscsi_protocol": value => $iscsi_protocol;
}
if $manage_volume_type {

View File

@ -9,6 +9,12 @@
# (optional) The name of the cinder::backend::netapp ressource
# Defaults to $name.
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*netapp_login*]
# (required) Administrative user account name used to access the storage
# system or proxy server.
@ -200,6 +206,7 @@ define cinder::backend::netapp (
$netapp_password,
$netapp_server_hostname,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$netapp_server_port = '80',
$netapp_size_multiplier = '1.2',
$netapp_storage_family = 'ontap_cluster',
@ -240,6 +247,7 @@ define cinder::backend::netapp (
cinder_config {
"${name}/nfs_mount_options": value => $nfs_mount_options;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.netapp.common.NetAppDriver';
"${name}/netapp_login": value => $netapp_login;
"${name}/netapp_password": value => $netapp_password, secret => true;

View File

@ -17,6 +17,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*nexenta_volume*]
# (optional) Pool on SA that will hold all volumes.
# Defaults to 'cinder'.
@ -62,6 +68,7 @@ define cinder::backend::nexenta (
$nexenta_password,
$nexenta_host,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nexenta_volume = 'cinder',
$nexenta_target_prefix = 'iqn:',
$nexenta_target_group_prefix = 'cinder/',
@ -77,6 +84,7 @@ define cinder::backend::nexenta (
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/nexenta_user": value => $nexenta_user;
"${name}/nexenta_password": value => $nexenta_password, secret => true;
"${name}/nexenta_host": value => $nexenta_host;

View File

@ -24,6 +24,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*nexenta_lun_container*]
# (optional) Logical path of bucket for LUNs.
# Defaults to 'cinder'.
@ -57,27 +63,29 @@ define cinder::backend::nexenta_edge (
$nexenta_rest_password,
$nexenta_rest_address,
$nexenta_client_address,
$nexenta_rest_port = '8080',
$volume_backend_name = $name,
$nexenta_lun_container = 'cinder',
$nexenta_iscsi_service = 'cinder',
$nexenta_chunksize = '32768',
$volume_driver = 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver',
$manage_volume_type = false,
$extra_options = {},
$nexenta_rest_port = '8080',
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nexenta_lun_container = 'cinder',
$nexenta_iscsi_service = 'cinder',
$nexenta_chunksize = '32768',
$volume_driver = 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver',
$manage_volume_type = false,
$extra_options = {},
) {
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/nexenta_rest_user": value => $nexenta_rest_user;
"${name}/nexenta_rest_password": value => $nexenta_rest_password, secret => true;
"${name}/nexenta_rest_address": value => $nexenta_rest_address;
"${name}/nexenta_client_address": value => $nexenta_client_address;
"${name}/nexenta_rest_port": value => $nexenta_rest_port;
"${name}/nexenta_lun_container": value => $nexenta_lun_container;
"${name}/nexenta_iscsi_service": value => $nexenta_iscsi_service;
"${name}/nexenta_chunksize": value => $nexenta_chunksize;
"${name}/volume_driver": value => $volume_driver;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/nexenta_rest_user": value => $nexenta_rest_user;
"${name}/nexenta_rest_password": value => $nexenta_rest_password, secret => true;
"${name}/nexenta_rest_address": value => $nexenta_rest_address;
"${name}/nexenta_client_address": value => $nexenta_client_address;
"${name}/nexenta_rest_port": value => $nexenta_rest_port;
"${name}/nexenta_lun_container": value => $nexenta_lun_container;
"${name}/nexenta_iscsi_service": value => $nexenta_iscsi_service;
"${name}/nexenta_chunksize": value => $nexenta_chunksize;
"${name}/volume_driver": value => $volume_driver;
}
if $manage_volume_type {

View File

@ -6,6 +6,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*nfs_servers*]
# (Required) Description
# Defaults to '[]'
@ -89,6 +95,7 @@
#
define cinder::backend::nfs (
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nfs_servers = [],
$nfs_mount_attempts = $::os_service_default,
$nfs_mount_options = $::os_service_default,
@ -116,6 +123,7 @@ define cinder::backend::nfs (
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value =>
'cinder.volume.drivers.nfs.NfsDriver';
"${name}/nfs_shares_config": value => $nfs_shares_config;

View File

@ -31,6 +31,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'.
@ -44,28 +50,30 @@ define cinder::backend::nvmeof (
$target_port,
$target_helper,
$target_protocol,
$target_prefix = $::os_service_default,
$nvmet_port_id = '1',
$nvmet_ns_id = '10',
$volume_backend_name = $name,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default,
$target_prefix = $::os_service_default,
$nvmet_port_id = '1',
$nvmet_ns_id = '10',
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default,
) {
include ::cinder::deps
include ::cinder::params
cinder_config {
"${name}/target_ip_address": value => $target_ip_address;
"${name}/target_port": value => $target_port;
"${name}/target_helper": value => $target_helper;
"${name}/target_protocol": value => $target_protocol;
"${name}/target_prefix": value => $target_prefix;
"${name}/nvmet_port_id": value => $nvmet_port_id;
"${name}/nvmet_ns_id": value => $nvmet_ns_id;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => $volume_driver;
"${name}/volume_group": value => $volume_group;
"${name}/target_ip_address": value => $target_ip_address;
"${name}/target_port": value => $target_port;
"${name}/target_helper": value => $target_helper;
"${name}/target_protocol": value => $target_protocol;
"${name}/target_prefix": value => $target_prefix;
"${name}/nvmet_port_id": value => $nvmet_port_id;
"${name}/nvmet_ns_id": value => $nvmet_ns_id;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/volume_group": value => $volume_group;
}
package { 'nvmetcli':

View File

@ -15,6 +15,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*pure_storage_protocol*]
# (optional) Must be either 'iSCSI' or 'FC'. This will determine
# which Volume Driver will be configured; PureISCSIDriver or PureFCDriver.
@ -44,6 +50,7 @@ define cinder::backend::pure(
$san_ip,
$pure_api_token,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$pure_storage_protocol = 'iSCSI',
$use_chap_auth = false,
$use_multipath_for_image_xfer = true,
@ -60,6 +67,7 @@ define cinder::backend::pure(
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip;
"${name}/pure_api_token": value => $pure_api_token, secret => true;

View File

@ -34,6 +34,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created
@ -48,18 +54,20 @@
#
define cinder::backend::quobyte (
$quobyte_volume_url,
$quobyte_client_cfg = undef,
$quobyte_qcow2_volumes = undef,
$quobyte_sparsed_volumes = undef,
$quobyte_mount_point_base = undef,
$volume_backend_name = $name,
$manage_volume_type = false,
$quobyte_client_cfg = undef,
$quobyte_qcow2_volumes = undef,
$quobyte_sparsed_volumes = undef,
$quobyte_mount_point_base = undef,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$manage_volume_type = false,
) {
include ::cinder::deps
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value =>
'cinder.volume.drivers.quobyte.QuobyteDriver';
"${name}/quobyte_volume_url": value => $quobyte_volume_url;

View File

@ -21,6 +21,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*rbd_ceph_conf*]
# (optional) Path to the ceph configuration file to use
# Defaults to '/etc/ceph/ceph.conf'
@ -74,6 +80,7 @@ define cinder::backend::rbd (
$rbd_user,
$backend_host = undef,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$rbd_ceph_conf = '/etc/ceph/ceph.conf',
$rbd_flatten_volume_from_snapshot = $::os_service_default,
$rbd_secret_uuid = $::os_service_default,
@ -91,6 +98,7 @@ define cinder::backend::rbd (
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.rbd.RBDDriver';
"${name}/rbd_ceph_conf": value => $rbd_ceph_conf;
"${name}/rbd_user": value => $rbd_user;

View File

@ -12,6 +12,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*san_thin_provision*]
# (optional) Use thin provisioning for SAN volumes? Defaults to true.
#
@ -64,38 +70,40 @@
#
define cinder::backend::san (
$volume_driver,
$volume_backend_name = $name,
$san_thin_provision = true,
$san_ip = undef,
$san_login = 'admin',
$san_password = undef,
$san_private_key = undef,
$san_clustername = undef,
$san_ssh_port = 22,
$san_is_local = false,
$ssh_conn_timeout = 30,
$ssh_min_pool_conn = 1,
$ssh_max_pool_conn = 5,
$manage_volume_type = false,
$extra_options = {},
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$san_thin_provision = true,
$san_ip = undef,
$san_login = 'admin',
$san_password = undef,
$san_private_key = undef,
$san_clustername = undef,
$san_ssh_port = 22,
$san_is_local = false,
$ssh_conn_timeout = 30,
$ssh_min_pool_conn = 1,
$ssh_max_pool_conn = 5,
$manage_volume_type = false,
$extra_options = {},
) {
include ::cinder::deps
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_thin_provision": value => $san_thin_provision;
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/san_private_key": value => $san_private_key;
"${name}/san_clustername": value => $san_clustername;
"${name}/san_ssh_port": value => $san_ssh_port;
"${name}/san_is_local": value => $san_is_local;
"${name}/ssh_conn_timeout": value => $ssh_conn_timeout;
"${name}/ssh_min_pool_conn": value => $ssh_min_pool_conn;
"${name}/ssh_max_pool_conn": value => $ssh_max_pool_conn;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_thin_provision": value => $san_thin_provision;
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/san_private_key": value => $san_private_key;
"${name}/san_clustername": value => $san_clustername;
"${name}/san_ssh_port": value => $san_ssh_port;
"${name}/san_is_local": value => $san_is_local;
"${name}/ssh_conn_timeout": value => $ssh_conn_timeout;
"${name}/ssh_min_pool_conn": value => $ssh_min_pool_conn;
"${name}/ssh_max_pool_conn": value => $ssh_max_pool_conn;
}
if $manage_volume_type {

View File

@ -9,6 +9,12 @@
# (optional) The name of the cinder::backend::scaleio ressource
# Defaults to $name.
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*sio_login*]
# (required) Administrative user account name used to access the storage
# system or proxy server.
@ -109,6 +115,7 @@ define cinder::backend::scaleio (
$sio_storage_pool_name,
$sio_storage_pools,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$sio_server_port = $::os_service_default,
$sio_verify_server_certificate = $::os_service_default,
$sio_server_certificate_path = $::os_service_default,
@ -122,6 +129,7 @@ define cinder::backend::scaleio (
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver';
"${name}/san_login": value => $sio_login;
"${name}/san_password": value => $sio_password, secret => true;

View File

@ -9,6 +9,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (optional) Setup cinder-volume to use SolidFire volume driver.
# Defaults to 'cinder.volume.drivers.solidfire.SolidFireDriver'
@ -87,7 +93,8 @@ define cinder::backend::solidfire(
$san_login,
$san_password,
$volume_backend_name = $name,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $::os_service_default,
$sf_allow_tenant_qos = $::os_service_default,
$sf_account_prefix = $::os_service_default,
@ -106,6 +113,7 @@ define cinder::backend::solidfire(
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;

View File

@ -8,6 +8,12 @@
# (optional) The name of the cinder::backend::veritas_hyperscale ressource
# Defaults to $name.
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend
# Defaults to: {}
@ -30,15 +36,17 @@
#
define cinder::backend::veritas_hyperscale (
$volume_backend_name = $name,
$extra_options = {},
$manage_volume_type = false,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {},
$manage_volume_type = false,
) {
include ::cinder::deps
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.veritas.vrtshyperscale.HyperScaleDriver';
"${name}/image_volume_cache_enabled": value => true
}

View File

@ -17,6 +17,12 @@
# Used to set the volume_backend_name in multiple backends.
# Defaults to $name as passed in the title.
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*api_retry_count*]
# (optional) The number of times we retry on failures,
# e.g., socket error, etc.
@ -66,6 +72,7 @@ define cinder::backend::vmdk (
$host_username,
$host_password,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_folder = 'cinder-volumes',
$api_retry_count = $::os_service_default,
$max_object_retrieval = $::os_service_default,
@ -90,6 +97,7 @@ module default of \"5\" and will be changed to the upstream OpenStack default in
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver';
"${name}/vmware_host_ip": value => $host_ip;
"${name}/vmware_host_username": value => $host_username;

View File

@ -14,6 +14,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*shares_config_path*]
# (optional) Shares config file path.
# Defaults to: /etc/cinder/vzstorage_shares
@ -59,23 +65,25 @@
define cinder::backend::vstorage (
$cluster_name,
$cluster_password,
$volume_backend_name = $name,
$shares_config_path = '/etc/cinder/vzstorage_shares',
$use_sparsed_volumes = $::os_service_default,
$used_ratio = $::os_service_default,
$mount_point_base = $::os_service_default,
$default_volume_format = $::os_service_default,
$manage_volume_type = false,
$mount_user = 'cinder',
$mount_group = 'root',
$mount_permissions = '0770',
$manage_package = true,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$shares_config_path = '/etc/cinder/vzstorage_shares',
$use_sparsed_volumes = $::os_service_default,
$used_ratio = $::os_service_default,
$mount_point_base = $::os_service_default,
$default_volume_format = $::os_service_default,
$manage_volume_type = false,
$mount_user = 'cinder',
$mount_group = 'root',
$mount_permissions = '0770',
$manage_package = true,
) {
include ::cinder::deps
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => 'cinder.volume.drivers.vzstorage.VZStorageDriver';
"${name}/vzstorage_shares_config": value => $shares_config_path;
"${name}/vzstorage_sparsed_volumes": value => $use_sparsed_volumes;

View File

@ -0,0 +1,6 @@
---
features:
- |
Add new "backend_availability_zone" parameter to every volume
backend. The parameters are optional, and when set they override the
DEFAULT/storage_availability_zone for the corresponding backend.

View File

@ -22,19 +22,21 @@ describe 'cinder::backend::bdd' do
should contain_cinder_config('hippo/volume_group').with_value('<SERVICE DEFAULT>')
should contain_cinder_config('hippo/iscsi_protocol').with_value('<SERVICE DEFAULT>')
should contain_cinder_config('hippo/volume_clear').with_value('<SERVICE DEFAULT>')
should contain_cinder_config('hippo/backend_availability_zone').with_value('<SERVICE DEFAULT>')
end
end
context 'with optional parameters' do
before :each do
params.merge!({
:iscsi_ip_address => '10.20.0.2',
:available_devices => '/dev/sdb,/dev/sdc',
:volumes_dir => '/var/lib/cinder/bdd-volumes',
:volume_clear => 'zero',
:volume_group => 'cinder',
:iscsi_helper => 'lioadm',
:manage_volume_type => true,
:iscsi_ip_address => '10.20.0.2',
:available_devices => '/dev/sdb,/dev/sdc',
:volumes_dir => '/var/lib/cinder/bdd-volumes',
:volume_clear => 'zero',
:volume_group => 'cinder',
:iscsi_helper => 'lioadm',
:manage_volume_type => true,
:backend_availability_zone => 'my_zone',
})
end
@ -45,6 +47,7 @@ describe 'cinder::backend::bdd' do
should contain_cinder_config('hippo/iscsi_helper').with_value('lioadm')
should contain_cinder_config('hippo/volume_group').with_value('cinder')
should contain_cinder_config('hippo/volume_clear').with_value('zero')
should contain_cinder_config('hippo/backend_availability_zone').with_value('my_zone')
end
it 'should create type with properties' do
should contain_cinder_type('hippo').with(:ensure => :present, :properties => ['volume_backend_name=hippo'])

View File

@ -17,11 +17,20 @@ describe 'cinder::backend::dellemc_unity' do
let :default_params do
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:unity_io_ports => '<SERVICE DEFAULT>',
:unity_storage_pool_names => '<SERVICE DEFAULT>',
}
end
let :custom_params do
{
:backend_availability_zone => 'my_zone',
:unity_io_ports => '1,42,66',
:unity_storage_pool_names => 'pool_1,pool_2',
}
end
let :facts do
OSDefaults.get_facts({})
end
@ -41,8 +50,14 @@ describe 'cinder::backend::dellemc_unity' do
end
end
context 'with default parameters' do
it_configures 'dellemc_unity volume driver'
end
context 'with parameters' do
context 'with custom parameters' do
before do
params.merge(custom_params)
end
it_configures 'dellemc_unity volume driver'
end

View File

@ -25,13 +25,14 @@ describe 'cinder::backend::dellemc_vmax_iscsi' do
describe 'dell emc vmax iscsi backend overriding some parameters' do
before :each do
params.merge!({
:backend_availability_zone => 'my_zone',
:manage_volume_type => true,
})
end
it 'configure dell emc vmax iscsi volume driver' do
is_expected.to contain_cinder_config('dellemc_vmax_iscsi/cinder_emc_config_file').with_value('/etc/cinder/cinder_emc_config_CONF_GROUP_ISCSI.xml'
)
is_expected.to contain_cinder_config('dellemc_vmax_iscsi/cinder_emc_config_file').with_value('/etc/cinder/cinder_emc_config_CONF_GROUP_ISCSI.xml')
is_expected.to contain_cinder_config('dellemc_vmax_iscsi/backend_availability_zone').with_value('my_zone')
end
it 'should create type with properties' do

View File

@ -17,12 +17,22 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
let :default_params do
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:xtremio_array_busy_retry_count => 5,
:xtremio_array_busy_retry_interval => 5,
:xtremio_volumes_per_glance_cache => 100,
}
end
let :custom_params do
{
:backend_availability_zone => 'my_zone',
:xtremio_array_busy_retry_count => 15,
:xtremio_array_busy_retry_interval => 25,
:xtremio_volumes_per_glance_cache => 10,
}
end
let :facts do
OSDefaults.get_facts({})
end
@ -43,7 +53,14 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
end
context 'with parameters' do
context 'with default parameters' do
it_configures 'dellemc_xtremio_iscsi volume driver'
end
context 'with custom parameters' do
before do
params.merge(custom_params)
end
it_configures 'dellemc_xtremio_iscsi volume driver'
end

View File

@ -18,6 +18,7 @@ describe 'cinder::backend::dellsc_iscsi' do
let :default_params do
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:dell_sc_api_port => '<SERVICE DEFAULT>',
:dell_sc_server_folder => 'srv',
:dell_sc_verify_cert => '<SERVICE DEFAULT>',
@ -32,6 +33,22 @@ describe 'cinder::backend::dellsc_iscsi' do
}
end
let :custom_params do
{
:backend_availability_zone => 'my_zone',
:dell_sc_api_port => 111,
:dell_sc_server_folder => 'other_srv',
:dell_sc_verify_cert => true,
:dell_sc_volume_folder => 'other_vol',
:iscsi_port => 222,
:excluded_domain_ip => '127.0.0.2',
:secondary_san_ip => '127.0.0.3',
:secondary_san_login => 'Foo',
:secondary_san_password => 'Bar',
:secondary_sc_api_port => 333,
}
end
let :facts do
OSDefaults.get_facts({})
end
@ -53,7 +70,14 @@ describe 'cinder::backend::dellsc_iscsi' do
end
context 'with parameters' do
context 'with default parameters' do
it_configures 'dellsc_iscsi volume driver'
end
context 'with custom parameters' do
before do
params.merge(custom_params)
end
it_configures 'dellsc_iscsi volume driver'
end

View File

@ -32,6 +32,7 @@ describe 'cinder::backend::emc_vnx' do
is_expected.to contain_cinder_config('emc/storage_vnx_authentication_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/storage_vnx_security_file_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/naviseccli_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/backend_availability_zone').with_value('<SERVICE DEFAULT>')
end
end
@ -44,6 +45,7 @@ describe 'cinder::backend::emc_vnx' do
:naviseccli_path => '/opt/Navisphere/bin/naviseccli',
:manage_volume_type => true,
:storage_protocol => 'fc',
:backend_availability_zone => 'my_zone',
})
end
@ -53,6 +55,7 @@ describe 'cinder::backend::emc_vnx' do
is_expected.to contain_cinder_config('emc/storage_vnx_security_file_dir').with_value(params[:storage_vnx_security_file_dir])
is_expected.to contain_cinder_config('emc/naviseccli_path').with_value(params[:naviseccli_path])
is_expected.to contain_cinder_config('emc/storage_protocol').with_value(params[:storage_protocol])
is_expected.to contain_cinder_config('emc/backend_availability_zone').with_value(params[:backend_availability_zone])
end
it 'should create type with properties' do

View File

@ -7,19 +7,20 @@ describe 'cinder::backend::eqlx' do
let :params do
{
:san_ip => '192.168.100.10',
:san_login => 'grpadmin',
:san_password => '12345',
:san_private_key => '',
:volume_backend_name => 'Dell_EQLX',
:san_thin_provision => '<SERVICE DEFAULT>',
:eqlx_group_name => '<SERVICE DEFAULT>',
:eqlx_pool => 'apool',
:use_chap_auth => true,
:chap_username => 'chapadm',
:chap_password => '56789',
:ssh_conn_timeout => 31,
:eqlx_cli_max_retries => 6,
:backend_availability_zone => 'my_zone',
:san_ip => '192.168.100.10',
:san_login => 'grpadmin',
:san_password => '12345',
:san_private_key => '',
:volume_backend_name => 'Dell_EQLX',
:san_thin_provision => '<SERVICE DEFAULT>',
:eqlx_group_name => '<SERVICE DEFAULT>',
:eqlx_pool => 'apool',
:use_chap_auth => true,
:chap_username => 'chapadm',
:chap_password => '56789',
:ssh_conn_timeout => 31,
:eqlx_cli_max_retries => 6,
}
end

View File

@ -11,6 +11,7 @@ describe 'cinder::backend::glusterfs' do
let :params do
{
:backend_availability_zone => 'my_zone',
:glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'],
:glusterfs_shares_config => '/etc/cinder/other_shares.conf',
:glusterfs_sparsed_volumes => true,
@ -21,6 +22,8 @@ describe 'cinder::backend::glusterfs' do
it 'configures glusterfs volume driver' do
is_expected.to contain_cinder_config('mygluster/volume_driver').with_value(
'cinder.volume.drivers.glusterfs.GlusterfsDriver')
is_expected.to contain_cinder_config('mygluster/backend_availability_zone').with_value(
'my_zone')
is_expected.to contain_cinder_config('mygluster/glusterfs_backup_mount_point').with_value(
'<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('mygluster/glusterfs_backup_share').with_value(

View File

@ -12,29 +12,31 @@ describe 'cinder::backend::gpfs' do
let :default_params do
{
:gpfs_max_clone_depth => '<SERVICE DEFAULT>',
:gpfs_sparse_volumes => '<SERVICE DEFAULT>',
:gpfs_storage_pool => '<SERVICE DEFAULT>',
:gpfs_images_dir => '<SERVICE DEFAULT>',
:gpfs_images_share_mode => '<SERVICE DEFAULT>',
:nas_host => '<SERVICE DEFAULT>',
:nas_login => '<SERVICE DEFAULT>',
:nas_password => '<SERVICE DEFAULT>',
:nas_private_key => '<SERVICE DEFAULT>',
:nas_ssh_port => '<SERVICE DEFAULT>',
:backend_availability_zone => '<SERVICE DEFAULT>',
:gpfs_max_clone_depth => '<SERVICE DEFAULT>',
:gpfs_sparse_volumes => '<SERVICE DEFAULT>',
:gpfs_storage_pool => '<SERVICE DEFAULT>',
:gpfs_images_dir => '<SERVICE DEFAULT>',
:gpfs_images_share_mode => '<SERVICE DEFAULT>',
:nas_host => '<SERVICE DEFAULT>',
:nas_login => '<SERVICE DEFAULT>',
:nas_password => '<SERVICE DEFAULT>',
:nas_private_key => '<SERVICE DEFAULT>',
:nas_ssh_port => '<SERVICE DEFAULT>',
}
end
let :custom_params do
{
:gpfs_max_clone_depth => 1,
:gpfs_sparse_volumes => false,
:gpfs_storage_pool => 'foo',
:nas_host => 'nas_host',
:nas_login => 'admin',
:nas_password => 'nas_password',
:nas_private_key => '/path/to/private_key',
:nas_ssh_port => '22',
:backend_availability_zone => 'my_zone',
:gpfs_max_clone_depth => 1,
:gpfs_sparse_volumes => false,
:gpfs_storage_pool => 'foo',
:nas_host => 'nas_host',
:nas_login => 'admin',
:nas_password => 'nas_password',
:nas_private_key => '/path/to/private_key',
:nas_ssh_port => '22',
}
end

View File

@ -5,13 +5,14 @@ describe 'cinder::backend::hpe3par_iscsi' do
let :req_params do
{
:hpe3par_api_url => 'https://172.0.0.2:8080/api/v1',
:hpe3par_username => '3paradm',
:hpe3par_password => 'password',
:hpe3par_iscsi_ips => '172.0.0.3',
:san_ip => '172.0.0.2',
:san_login => '3paradm',
:san_password => 'password',
:backend_availability_zone => 'my_zone',
:hpe3par_api_url => 'https://172.0.0.2:8080/api/v1',
:hpe3par_username => '3paradm',
:hpe3par_password => 'password',
:hpe3par_iscsi_ips => '172.0.0.3',
:san_ip => '172.0.0.2',
:san_login => '3paradm',
:san_password => 'password',
}
end
@ -22,6 +23,7 @@ describe 'cinder::backend::hpe3par_iscsi' do
describe 'hpe3par_iscsi volume driver' do
it 'configure hpe3par_iscsi volume driver' do
is_expected.to contain_cinder_config('hpe3par_iscsi/volume_driver').with_value('cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver')
is_expected.to contain_cinder_config('hpe3par_iscsi/backend_availability_zone').with_value('my_zone')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_api_url').with_value('https://172.0.0.2:8080/api/v1')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_username').with_value('3paradm')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_password').with_value('password')

View File

@ -5,10 +5,11 @@ describe 'cinder::backend::hpelefthand_iscsi' do
let :req_params do
{
:hpelefthand_api_url => 'https://10.206.219.18:8081/lhos',
:hpelefthand_username => 'admin',
:hpelefthand_password => 'password',
:hpelefthand_clustername => 'nfvsys_clust_001',
:backend_availability_zone => 'my_zone',
:hpelefthand_api_url => 'https://10.206.219.18:8081/lhos',
:hpelefthand_username => 'admin',
:hpelefthand_password => 'password',
:hpelefthand_clustername => 'nfvsys_clust_001',
}
end
@ -19,6 +20,7 @@ describe 'cinder::backend::hpelefthand_iscsi' do
describe 'hpelefthand_iscsi volume driver' do
it 'configure hpelefthand_iscsi volume driver' do
is_expected.to contain_cinder_config('hpelefthand_iscsi/volume_driver').with_value('cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver')
is_expected.to contain_cinder_config('hpelefthand_iscsi/backend_availability_zone').with_value('my_zone')
is_expected.to contain_cinder_config('hpelefthand_iscsi/hpelefthand_api_url').with_value('https://10.206.219.18:8081/lhos')
is_expected.to contain_cinder_config('hpelefthand_iscsi/hpelefthand_username').with_value('admin')
is_expected.to contain_cinder_config('hpelefthand_iscsi/hpelefthand_password').with_value('password')

View File

@ -31,6 +31,8 @@ describe 'cinder::backend::iscsi' do
it 'should configure iscsi driver' do
is_expected.to contain_cinder_config('hippo/volume_backend_name').with(
:value => 'hippo')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/volume_driver').with(
:value => 'cinder.volume.drivers.lvm.LVMVolumeDriver')
is_expected.to contain_cinder_config('hippo/iscsi_ip_address').with(

View File

@ -11,6 +11,7 @@ describe 'cinder::backend::netapp' do
let :params do
{
:volume_backend_name => 'netapp-cdot-nfs',
:backend_availability_zone => 'my_zone',
:netapp_login => 'netapp',
:netapp_password => 'password',
:netapp_server_hostname => '127.0.0.2',
@ -25,6 +26,7 @@ describe 'cinder::backend::netapp' do
let :default_params do
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:netapp_server_port => '80',
:netapp_size_multiplier => '1.2',
:netapp_storage_family => 'ontap_cluster',

View File

@ -11,11 +11,13 @@ describe 'cinder::backend::nexenta_edge' do
end
let :default_params do
{ :nexenta_rest_port => '8080',
:nexenta_lun_container => 'cinder',
:nexenta_iscsi_service => 'cinder',
:nexenta_chunksize => '32768',
:volume_driver => 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver' }
{ :nexenta_rest_port => '8080',
:nexenta_lun_container => 'cinder',
:nexenta_iscsi_service => 'cinder',
:nexenta_chunksize => '32768',
:volume_driver => 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver',
:backend_availability_zone => '<SERVICE DEFAULT>',
}
end
let :facts do

View File

@ -19,7 +19,9 @@ describe 'cinder::backend::nexenta' do
:nexenta_blocksize => '8192',
:nexenta_sparse => true,
:nexenta_rest_port => '8457',
:volume_driver => 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver' }
:volume_driver => 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver',
:backend_availability_zone => '<SERVICE DEFAULT>',
}
end
let :facts do

View File

@ -6,6 +6,7 @@ describe 'cinder::backend::nfs' do
let :params do
{
:backend_availability_zone => 'my_zone',
:nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'],
:nfs_mount_attempts => '4',
:nfs_mount_options => 'vers=3',
@ -27,6 +28,8 @@ describe 'cinder::backend::nfs' do
it 'configures nfs volume driver' do
is_expected.to contain_cinder_config('hippo/volume_backend_name').with(
:value => 'hippo')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value(
'my_zone')
is_expected.to contain_cinder_config('hippo/volume_driver').with_value(
'cinder.volume.drivers.nfs.NfsDriver')
is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value(

View File

@ -37,6 +37,8 @@ describe 'cinder::backend::nvmeof' do
:value => '10')
is_expected.to contain_cinder_config('nvme-backend/volume_backend_name').with(
:value => 'nvme-backend')
is_expected.to contain_cinder_config('nvme-backend/backend_availability_zone').with(
:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/volume_driver').with(
:value => 'cinder.volume.drivers.lvm.LVMVolumeDriver')
end

View File

@ -27,13 +27,15 @@ describe 'cinder::backend::pure' do
describe 'pure iscsi volume driver' do
let :params do
req_params.merge({
'pure_storage_protocol' => 'iSCSI',
'use_chap_auth' => 'true'
'backend_availability_zone' => 'my_zone',
'pure_storage_protocol' => 'iSCSI',
'use_chap_auth' => 'true',
})
end
it 'configure pure volume driver' do
is_expected.to contain_cinder_config('pure/volume_driver').with_value('cinder.volume.drivers.pure.PureISCSIDriver')
is_expected.to contain_cinder_config('pure/backend_availability_zone').with_value('my_zone')
is_expected.to contain_cinder_config('pure/san_ip').with_value('127.0.0.2')
is_expected.to contain_cinder_config('pure/pure_api_token').with_value('abc123def456ghi789')
is_expected.to contain_cinder_config('pure/use_multipath_for_image_xfer').with_value('true')

View File

@ -7,9 +7,10 @@ describe 'cinder::backend::quobyte' do
let :params do
{
:quobyte_volume_url => 'quobyte://quobyte.cluster.example.com/volume-name',
:quobyte_qcow2_volumes => false,
:quobyte_sparsed_volumes => true,
:quobyte_volume_url => 'quobyte://quobyte.cluster.example.com/volume-name',
:quobyte_qcow2_volumes => false,
:quobyte_sparsed_volumes => true,
:backend_availability_zone => 'my_zone',
}
end
@ -22,6 +23,8 @@ describe 'cinder::backend::quobyte' do
false)
is_expected.to contain_cinder_config('myquobyte/quobyte_sparsed_volumes').with_value(
true)
is_expected.to contain_cinder_config('myquobyte/backend_availability_zone').with_value(
'my_zone')
end
context 'quobyte backend with cinder type' do

View File

@ -84,15 +84,22 @@ describe 'cinder::backend::rbd' do
end
end
context 'override backend_host parameter' do
context 'override backend_host and backend_availability_zone parameters' do
before do
params.merge!({:backend_host => 'test_host.fqdn.com' })
params.merge!(
{
:backend_host => 'test_host.fqdn.com',
:backend_availability_zone => 'my_zone',
})
end
it 'configure rbd backend with specific hostname' do
it 'configure rbd backend with specific hostname and availability zone' do
is_expected.to contain_cinder_config('rbd-ssd/backend_host').with({
:value => 'test_host.fqdn.com',
})
is_expected.to contain_cinder_config('rbd-ssd/backend_availability_zone').with({
:value => 'my_zone',
})
end
end

View File

@ -4,11 +4,14 @@ describe 'cinder::backend::san' do
let (:title) { 'mysan' }
let :params do
{ :volume_driver => 'cinder.volume.san.SolarisISCSIDriver',
:san_ip => '127.0.0.1',
:san_login => 'cluster_operator',
:san_password => '007',
:san_clustername => 'storage_cluster' }
{
:backend_availability_zone => 'my_zone',
:volume_driver => 'cinder.volume.san.SolarisISCSIDriver',
:san_ip => '127.0.0.1',
:san_login => 'cluster_operator',
:san_password => '007',
:san_clustername => 'storage_cluster',
}
end
let :default_params do

View File

@ -16,6 +16,7 @@ describe 'cinder::backend::scaleio' do
let :params2 do
{
:backend_availability_zone => 'my_zone',
:sio_server_certificate_path => '/path/cert.pem',
:sio_max_over_subscription_ratio => '6.0',
:sio_verify_server_certificate => true,

View File

@ -15,6 +15,7 @@ describe 'cinder::backend::solidfire' do
let :other_params do
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:sf_emulate_512 => '<SERVICE DEFAULT>',
:sf_allow_tenant_qos => '<SERVICE DEFAULT>',
:sf_account_prefix => '<SERVICE DEFAULT>',

View File

@ -5,7 +5,8 @@ describe 'cinder::backend::veritas_hyperscale' do
let (:title) { 'Veritas_HyperScale' }
let :params do {
:manage_volume_type => true,
:backend_availability_zone => 'my_zone',
:manage_volume_type => true,
}
end
@ -15,6 +16,8 @@ describe 'cinder::backend::veritas_hyperscale' do
'cinder.volume.drivers.veritas.vrtshyperscale.HyperScaleDriver')
should contain_cinder_config("#{title}/volume_backend_name").with_value(
"#{title}")
should contain_cinder_config("#{title}/backend_availability_zone").with_value(
'my_zone')
should contain_cinder_config("#{title}/image_volume_cache_enabled").with_value(
true)
end

View File

@ -26,6 +26,7 @@ describe 'cinder::backend::vmdk' do
:max_object_retrieval => 200,
:task_poll_interval => 10,
:image_transfer_timeout_secs => 3600,
:backend_availability_zone => 'my_zone',
:wsdl_location => 'http://127.0.0.1:8080/vmware/SDK/wsdl/vim25/vimService.wsdl'
}
end
@ -42,6 +43,7 @@ describe 'cinder::backend::vmdk' do
is_expected.to contain_cinder_config('hippo/vmware_task_poll_interval').with_value(5)
is_expected.to contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs])
is_expected.to contain_cinder_config('hippo/vmware_wsdl_location').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value('<SERVICE DEFAULT>')
end
it 'installs suds python package' do
@ -55,12 +57,14 @@ describe 'cinder::backend::vmdk' do
end
it 'should configure vmdk driver in cinder.conf' do
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value(params[:backend_availability_zone])
is_expected.to contain_cinder_config('hippo/vmware_volume_folder').with_value(params[:volume_folder])
is_expected.to contain_cinder_config('hippo/vmware_api_retry_count').with_value(params[:api_retry_count])
is_expected.to contain_cinder_config('hippo/vmware_max_object_retrieval').with_value(params[:max_object_retrieval])
is_expected.to contain_cinder_config('hippo/vmware_task_poll_interval').with_value(params[:task_poll_interval])
is_expected.to contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs])
is_expected.to contain_cinder_config('hippo/vmware_wsdl_location').with_value(params[:wsdl_location])
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value(params[:backend_availability_zone])
is_expected.to contain_cinder_config('hippo/host').with_value("vmdk:#{params[:host_ip]}-#{params[:volume_folder]}")
end
end

View File

@ -6,23 +6,26 @@ describe 'cinder::backend::vstorage' do
let :params do
{
:cluster_name => 'stor1',
:cluster_password => 'passw0rd',
:shares_config_path => '/etc/cinder/vstorage_shares.conf',
:use_sparsed_volumes => true,
:used_ratio => '0.9',
:mount_point_base => '/vstorage',
:default_volume_format => 'ploop',
:mount_user => 'cinder',
:mount_group => 'root',
:mount_permissions => '0770',
:manage_package => true,
:cluster_name => 'stor1',
:cluster_password => 'passw0rd',
:backend_availability_zone => 'my_zone',
:shares_config_path => '/etc/cinder/vstorage_shares.conf',
:use_sparsed_volumes => true,
:used_ratio => '0.9',
:mount_point_base => '/vstorage',
:default_volume_format => 'ploop',
:mount_user => 'cinder',
:mount_group => 'root',
:mount_permissions => '0770',
:manage_package => true,
}
end
it 'configures vstorage volume driver' do
is_expected.to contain_cinder_config('vstorage/volume_backend_name').with(
:value => 'vstorage')
is_expected.to contain_cinder_config('vstorage/backend_availability_zone').with_value(
'my_zone')
is_expected.to contain_cinder_config('vstorage/volume_driver').with_value(
'cinder.volume.drivers.vzstorage.VZStorageDriver')
is_expected.to contain_cinder_config('vstorage/vzstorage_shares_config').with_value(