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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (Optional) Driver to use for volume creation # (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.block_device.BlockDeviceDriver'. # Defaults to 'cinder.volume.drivers.block_device.BlockDeviceDriver'.
@@ -67,6 +73,7 @@ define cinder::backend::bdd (
$iscsi_ip_address, $iscsi_ip_address,
$available_devices, $available_devices,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.block_device.BlockDeviceDriver', $volume_driver = 'cinder.volume.drivers.block_device.BlockDeviceDriver',
$volume_group = $::os_service_default, $volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes', $volumes_dir = '/var/lib/cinder/volumes',
@@ -88,6 +95,7 @@ define cinder::backend::bdd (
cinder_config { cinder_config {
"${name}/available_devices": value => $available_devices; "${name}/available_devices": value => $available_devices;
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address; "${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper; "${name}/iscsi_helper": value => $iscsi_helper;

View File

@@ -20,6 +20,12 @@
# (optional) The storage backend name. # (optional) The storage backend name.
# Defaults to the $name of the backend # 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*] # [*unity_io_ports*]
# (optional) A comma-separated list of iSCSI or FC ports to be used. # (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. # Each port can be Unix-style glob expressions. The Unity Unisphere API port.
@@ -47,6 +53,7 @@ define cinder::backend::dellemc_unity (
$san_password, $san_password,
$storage_protocol, $storage_protocol,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$unity_io_ports = $::os_service_default, $unity_io_ports = $::os_service_default,
$unity_storage_pool_names = $::os_service_default, $unity_storage_pool_names = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
@@ -58,6 +65,7 @@ define cinder::backend::dellemc_unity (
$driver = 'dell_emc.unity.Driver' $driver = 'dell_emc.unity.Driver'
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;

View File

@@ -10,6 +10,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*cinder_emc_config_file*]
# (required) File path of Dell EMC VMAX ISCSI specific configuration file. # (required) File path of Dell EMC VMAX ISCSI specific configuration file.
# #
@@ -32,6 +38,7 @@
define cinder::backend::dellemc_vmax_iscsi ( define cinder::backend::dellemc_vmax_iscsi (
$cinder_emc_config_file, $cinder_emc_config_file,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {}, $extra_options = {},
$volume_driver = 'cinder.volume.drivers.dell_emc.vmax.iscsi.VMAXISCSIDriver', $volume_driver = 'cinder.volume.drivers.dell_emc.vmax.iscsi.VMAXISCSIDriver',
$manage_volume_type = false, $manage_volume_type = false,
@@ -42,6 +49,7 @@ define cinder::backend::dellemc_vmax_iscsi (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/cinder_emc_config_file": value => $cinder_emc_config_file; "${name}/cinder_emc_config_file": value => $cinder_emc_config_file;
} }

View File

@@ -20,6 +20,12 @@
# (optional) The storage backend name. # (optional) The storage backend name.
# Defaults to the name of the backend # 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*] # [*xtremio_array_busy_retry_count*]
# (optional) Number of retries in case array is busy. # (optional) Number of retries in case array is busy.
# Defaults to 5 # Defaults to 5
@@ -50,6 +56,7 @@ define cinder::backend::dellemc_xtremio_iscsi (
$san_password, $san_password,
$xtremio_cluster_name, $xtremio_cluster_name,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$xtremio_array_busy_retry_count = 5, $xtremio_array_busy_retry_count = 5,
$xtremio_array_busy_retry_interval = 5, $xtremio_array_busy_retry_interval = 5,
$xtremio_volumes_per_glance_cache = 100, $xtremio_volumes_per_glance_cache = 100,
@@ -62,6 +69,7 @@ define cinder::backend::dellemc_xtremio_iscsi (
$driver = 'dell_emc.xtremio.XtremIOISCSIDriver' $driver = 'dell_emc.xtremio.XtremIOISCSIDriver'
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;

View File

@@ -23,6 +23,12 @@
# (optional) The storage backend name. # (optional) The storage backend name.
# Defaults to the name of the backend # 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*] # [*dell_sc_api_port*]
# (optional) The Enterprise Manager API port. # (optional) The Enterprise Manager API port.
# Defaults to $::os_service_default # Defaults to $::os_service_default
@@ -85,6 +91,7 @@ define cinder::backend::dellsc_iscsi (
$iscsi_ip_address, $iscsi_ip_address,
$dell_sc_ssn, $dell_sc_ssn,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$dell_sc_api_port = $::os_service_default, $dell_sc_api_port = $::os_service_default,
$dell_sc_server_folder = 'srv', $dell_sc_server_folder = 'srv',
$dell_sc_verify_cert = $::os_service_default, $dell_sc_verify_cert = $::os_service_default,
@@ -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' $driver = 'dell_emc.sc.storagecenter_iscsi.SCISCSIDriver'
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => "cinder.volume.drivers.${driver}";
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;

View File

@@ -10,6 +10,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*san_ip*]
# (required) IP address of SAN controller. # (required) IP address of SAN controller.
# #
@@ -87,6 +93,7 @@ define cinder::backend::emc_vnx (
$package_ensure = 'present', $package_ensure = 'present',
$san_login = 'admin', $san_login = 'admin',
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {}, $extra_options = {},
$volume_driver = 'cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver', $volume_driver = 'cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver',
$storage_protocol = 'iscsi', $storage_protocol = 'iscsi',
@@ -116,6 +123,7 @@ define cinder::backend::emc_vnx (
"${name}/san_password": value => $san_password, secret => true; "${name}/san_password": value => $san_password, secret => true;
"${name}/storage_vnx_pool_names": value => $storage_vnx_pool_names_real; "${name}/storage_vnx_pool_names": value => $storage_vnx_pool_names_real;
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/storage_protocol": value => $storage_protocol; "${name}/storage_protocol": value => $storage_protocol;
"${name}/initiator_auto_registration": value => $initiator_auto_registration; "${name}/initiator_auto_registration": value => $initiator_auto_registration;

View File

@@ -26,6 +26,12 @@
# (optional) The backend name. # (optional) The backend name.
# Defaults to the name of the resource # 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*] # [*eqlx_group_name*]
# (optional) The CLI prompt message without '>'. # (optional) The CLI prompt message without '>'.
# Defaults to $::os_service_default # Defaults to $::os_service_default
@@ -72,6 +78,7 @@ define cinder::backend::eqlx (
$san_private_key = $::os_service_default, $san_private_key = $::os_service_default,
$san_thin_provision = $::os_service_default, $san_thin_provision = $::os_service_default,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$eqlx_group_name = $::os_service_default, $eqlx_group_name = $::os_service_default,
$eqlx_pool = $::os_service_default, $eqlx_pool = $::os_service_default,
$eqlx_cli_max_retries = $::os_service_default, $eqlx_cli_max_retries = $::os_service_default,
@@ -95,6 +102,7 @@ define cinder::backend::eqlx (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.dell_emc.ps.PSSeriesISCSIDriver';
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;

View File

@@ -13,6 +13,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*glusterfs_backup_mount_point*]
# (optional) Base dir containing mount point for gluster share. # (optional) Base dir containing mount point for gluster share.
# Defaults to $::os_service_default # Defaults to $::os_service_default
@@ -56,6 +62,7 @@
define cinder::backend::glusterfs ( define cinder::backend::glusterfs (
$glusterfs_shares, $glusterfs_shares,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$glusterfs_backup_mount_point = $::os_service_default, $glusterfs_backup_mount_point = $::os_service_default,
$glusterfs_backup_share = $::os_service_default, $glusterfs_backup_share = $::os_service_default,
$glusterfs_sparsed_volumes = $::os_service_default, $glusterfs_sparsed_volumes = $::os_service_default,
@@ -77,8 +84,8 @@ define cinder::backend::glusterfs (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/volume_driver": value => "${name}/backend_availability_zone": value => $backend_availability_zone;
'cinder.volume.drivers.glusterfs.GlusterfsDriver'; "${name}/volume_driver": value => 'cinder.volume.drivers.glusterfs.GlusterfsDriver';
"${name}/glusterfs_backup_mount_point": value => $glusterfs_backup_mount_point; "${name}/glusterfs_backup_mount_point": value => $glusterfs_backup_mount_point;
"${name}/glusterfs_backup_share": value => $glusterfs_backup_share; "${name}/glusterfs_backup_share": value => $glusterfs_backup_share;
"${name}/glusterfs_shares_config": value => $glusterfs_shares_config; "${name}/glusterfs_shares_config": value => $glusterfs_shares_config;

View File

@@ -64,6 +64,12 @@
# (optional) SSH port to use to connect to NAS system. # (optional) SSH port to use to connect to NAS system.
# Defaults to $::os_service_default # 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*] # [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type. # (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created # If set to true, a Cinder Volume type will be created
@@ -96,6 +102,7 @@ define cinder::backend::gpfs (
$nas_password = $::os_service_default, $nas_password = $::os_service_default,
$nas_private_key = $::os_service_default, $nas_private_key = $::os_service_default,
$nas_ssh_port = $::os_service_default, $nas_ssh_port = $::os_service_default,
$backend_availability_zone = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
$extra_options = {}, $extra_options = {},
) { ) {
@@ -110,8 +117,7 @@ define cinder::backend::gpfs (
} }
cinder_config { cinder_config {
"${name}/volume_driver": "${name}/volume_driver": value => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver';
value => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver';
"${name}/gpfs_max_clone_depth": value => $gpfs_max_clone_depth; "${name}/gpfs_max_clone_depth": value => $gpfs_max_clone_depth;
"${name}/gpfs_mount_point_base": value => $gpfs_mount_point_base; "${name}/gpfs_mount_point_base": value => $gpfs_mount_point_base;
"${name}/gpfs_sparse_volumes": value => $gpfs_sparse_volumes; "${name}/gpfs_sparse_volumes": value => $gpfs_sparse_volumes;
@@ -123,6 +129,7 @@ define cinder::backend::gpfs (
"${name}/nas_password": value => $nas_password, secret => true; "${name}/nas_password": value => $nas_password, secret => true;
"${name}/nas_private_key": value => $nas_private_key; "${name}/nas_private_key": value => $nas_private_key;
"${name}/nas_ssh_port": value => $nas_ssh_port; "${name}/nas_ssh_port": value => $nas_ssh_port;
"${name}/backend_availability_zone": value => $backend_availability_zone;
} }
if $manage_volume_type { if $manage_volume_type {

View File

@@ -31,6 +31,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (optional) Setup cinder-volume to use HPE 3par volume driver. # (optional) Setup cinder-volume to use HPE 3par volume driver.
# Defaults to 'cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver' # Defaults to 'cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver'
@@ -75,6 +81,7 @@ define cinder::backend::hpe3par_iscsi(
$san_password, $san_password,
$hpe3par_iscsi_ips, $hpe3par_iscsi_ips,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver', $volume_driver = 'cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver',
$hpe3par_iscsi_chap_enabled = false, $hpe3par_iscsi_chap_enabled = false,
$hpe3par_cpg_snap = 'userCPG', $hpe3par_cpg_snap = 'userCPG',
@@ -92,6 +99,7 @@ define cinder::backend::hpe3par_iscsi(
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/hpe3par_username": value => $hpe3par_username; "${name}/hpe3par_username": value => $hpe3par_username;
"${name}/hpe3par_password": value => $hpe3par_password, secret => true; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (optional) Setup cinder-volume to use HPE LeftHand volume driver. # (optional) Setup cinder-volume to use HPE LeftHand volume driver.
# Defaults to 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver' # Defaults to 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver'
@@ -47,6 +53,7 @@ define cinder::backend::hpelefthand_iscsi(
$hpelefthand_password, $hpelefthand_password,
$hpelefthand_clustername, $hpelefthand_clustername,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver', $volume_driver = 'cinder.volume.drivers.hpe.hpe_lefthand_iscsi.HPELeftHandISCSIDriver',
$hpelefthand_iscsi_chap_enabled = false, $hpelefthand_iscsi_chap_enabled = false,
$hpelefthand_debug = false, $hpelefthand_debug = false,
@@ -58,6 +65,7 @@ define cinder::backend::hpelefthand_iscsi(
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/hpelefthand_username": value => $hpelefthand_username; "${name}/hpelefthand_username": value => $hpelefthand_username;
"${name}/hpelefthand_password": value => $hpelefthand_password, secret => true; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (Optional) Driver to use for volume creation # (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'. # Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'.
@@ -45,6 +51,7 @@
define cinder::backend::iscsi ( define cinder::backend::iscsi (
$iscsi_ip_address, $iscsi_ip_address,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver', $volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default, $volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes', $volumes_dir = '/var/lib/cinder/volumes',
@@ -68,6 +75,7 @@ define cinder::backend::iscsi (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/iscsi_ip_address": value => $iscsi_ip_address; "${name}/iscsi_ip_address": value => $iscsi_ip_address;
"${name}/iscsi_helper": value => $iscsi_helper; "${name}/iscsi_helper": value => $iscsi_helper;

View File

@@ -9,6 +9,12 @@
# (optional) The name of the cinder::backend::netapp ressource # (optional) The name of the cinder::backend::netapp ressource
# Defaults to $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.
#
# [*netapp_login*] # [*netapp_login*]
# (required) Administrative user account name used to access the storage # (required) Administrative user account name used to access the storage
# system or proxy server. # system or proxy server.
@@ -200,6 +206,7 @@ define cinder::backend::netapp (
$netapp_password, $netapp_password,
$netapp_server_hostname, $netapp_server_hostname,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$netapp_server_port = '80', $netapp_server_port = '80',
$netapp_size_multiplier = '1.2', $netapp_size_multiplier = '1.2',
$netapp_storage_family = 'ontap_cluster', $netapp_storage_family = 'ontap_cluster',
@@ -240,6 +247,7 @@ define cinder::backend::netapp (
cinder_config { cinder_config {
"${name}/nfs_mount_options": value => $nfs_mount_options; "${name}/nfs_mount_options": value => $nfs_mount_options;
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.netapp.common.NetAppDriver';
"${name}/netapp_login": value => $netapp_login; "${name}/netapp_login": value => $netapp_login;
"${name}/netapp_password": value => $netapp_password, secret => true; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*nexenta_volume*]
# (optional) Pool on SA that will hold all volumes. # (optional) Pool on SA that will hold all volumes.
# Defaults to 'cinder'. # Defaults to 'cinder'.
@@ -62,6 +68,7 @@ define cinder::backend::nexenta (
$nexenta_password, $nexenta_password,
$nexenta_host, $nexenta_host,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nexenta_volume = 'cinder', $nexenta_volume = 'cinder',
$nexenta_target_prefix = 'iqn:', $nexenta_target_prefix = 'iqn:',
$nexenta_target_group_prefix = 'cinder/', $nexenta_target_group_prefix = 'cinder/',
@@ -77,6 +84,7 @@ define cinder::backend::nexenta (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/nexenta_user": value => $nexenta_user; "${name}/nexenta_user": value => $nexenta_user;
"${name}/nexenta_password": value => $nexenta_password, secret => true; "${name}/nexenta_password": value => $nexenta_password, secret => true;
"${name}/nexenta_host": value => $nexenta_host; "${name}/nexenta_host": value => $nexenta_host;

View File

@@ -24,6 +24,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*nexenta_lun_container*]
# (optional) Logical path of bucket for LUNs. # (optional) Logical path of bucket for LUNs.
# Defaults to 'cinder'. # Defaults to 'cinder'.
@@ -59,6 +65,7 @@ define cinder::backend::nexenta_edge (
$nexenta_client_address, $nexenta_client_address,
$nexenta_rest_port = '8080', $nexenta_rest_port = '8080',
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nexenta_lun_container = 'cinder', $nexenta_lun_container = 'cinder',
$nexenta_iscsi_service = 'cinder', $nexenta_iscsi_service = 'cinder',
$nexenta_chunksize = '32768', $nexenta_chunksize = '32768',
@@ -69,6 +76,7 @@ define cinder::backend::nexenta_edge (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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_user": value => $nexenta_rest_user;
"${name}/nexenta_rest_password": value => $nexenta_rest_password, secret => true; "${name}/nexenta_rest_password": value => $nexenta_rest_password, secret => true;
"${name}/nexenta_rest_address": value => $nexenta_rest_address; "${name}/nexenta_rest_address": value => $nexenta_rest_address;

View File

@@ -6,6 +6,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*nfs_servers*]
# (Required) Description # (Required) Description
# Defaults to '[]' # Defaults to '[]'
@@ -89,6 +95,7 @@
# #
define cinder::backend::nfs ( define cinder::backend::nfs (
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$nfs_servers = [], $nfs_servers = [],
$nfs_mount_attempts = $::os_service_default, $nfs_mount_attempts = $::os_service_default,
$nfs_mount_options = $::os_service_default, $nfs_mount_options = $::os_service_default,
@@ -116,6 +123,7 @@ define cinder::backend::nfs (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => "${name}/volume_driver": value =>
'cinder.volume.drivers.nfs.NfsDriver'; 'cinder.volume.drivers.nfs.NfsDriver';
"${name}/nfs_shares_config": value => $nfs_shares_config; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (Optional) Driver to use for volume creation # (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'. # Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'.
@@ -48,6 +54,7 @@ define cinder::backend::nvmeof (
$nvmet_port_id = '1', $nvmet_port_id = '1',
$nvmet_ns_id = '10', $nvmet_ns_id = '10',
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver', $volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default, $volume_group = $::os_service_default,
) { ) {
@@ -64,6 +71,7 @@ define cinder::backend::nvmeof (
"${name}/nvmet_port_id": value => $nvmet_port_id; "${name}/nvmet_port_id": value => $nvmet_port_id;
"${name}/nvmet_ns_id": value => $nvmet_ns_id; "${name}/nvmet_ns_id": value => $nvmet_ns_id;
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/volume_group": value => $volume_group; "${name}/volume_group": value => $volume_group;
} }

View File

@@ -15,6 +15,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*pure_storage_protocol*]
# (optional) Must be either 'iSCSI' or 'FC'. This will determine # (optional) Must be either 'iSCSI' or 'FC'. This will determine
# which Volume Driver will be configured; PureISCSIDriver or PureFCDriver. # which Volume Driver will be configured; PureISCSIDriver or PureFCDriver.
@@ -44,6 +50,7 @@ define cinder::backend::pure(
$san_ip, $san_ip,
$pure_api_token, $pure_api_token,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$pure_storage_protocol = 'iSCSI', $pure_storage_protocol = 'iSCSI',
$use_chap_auth = false, $use_chap_auth = false,
$use_multipath_for_image_xfer = true, $use_multipath_for_image_xfer = true,
@@ -60,6 +67,7 @@ define cinder::backend::pure(
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/pure_api_token": value => $pure_api_token, secret => true; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type. # (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created # If set to true, a Cinder Volume type will be created
@@ -53,6 +59,7 @@ define cinder::backend::quobyte (
$quobyte_sparsed_volumes = undef, $quobyte_sparsed_volumes = undef,
$quobyte_mount_point_base = undef, $quobyte_mount_point_base = undef,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
) { ) {
@@ -60,6 +67,7 @@ define cinder::backend::quobyte (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => "${name}/volume_driver": value =>
'cinder.volume.drivers.quobyte.QuobyteDriver'; 'cinder.volume.drivers.quobyte.QuobyteDriver';
"${name}/quobyte_volume_url": value => $quobyte_volume_url; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*rbd_ceph_conf*]
# (optional) Path to the ceph configuration file to use # (optional) Path to the ceph configuration file to use
# Defaults to '/etc/ceph/ceph.conf' # Defaults to '/etc/ceph/ceph.conf'
@@ -74,6 +80,7 @@ define cinder::backend::rbd (
$rbd_user, $rbd_user,
$backend_host = undef, $backend_host = undef,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$rbd_ceph_conf = '/etc/ceph/ceph.conf', $rbd_ceph_conf = '/etc/ceph/ceph.conf',
$rbd_flatten_volume_from_snapshot = $::os_service_default, $rbd_flatten_volume_from_snapshot = $::os_service_default,
$rbd_secret_uuid = $::os_service_default, $rbd_secret_uuid = $::os_service_default,
@@ -91,6 +98,7 @@ define cinder::backend::rbd (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.rbd.RBDDriver';
"${name}/rbd_ceph_conf": value => $rbd_ceph_conf; "${name}/rbd_ceph_conf": value => $rbd_ceph_conf;
"${name}/rbd_user": value => $rbd_user; "${name}/rbd_user": value => $rbd_user;

View File

@@ -12,6 +12,12 @@
# (optional) Allows for the volume_backend_name to be separate of $name. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*san_thin_provision*]
# (optional) Use thin provisioning for SAN volumes? Defaults to true. # (optional) Use thin provisioning for SAN volumes? Defaults to true.
# #
@@ -65,6 +71,7 @@
define cinder::backend::san ( define cinder::backend::san (
$volume_driver, $volume_driver,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$san_thin_provision = true, $san_thin_provision = true,
$san_ip = undef, $san_ip = undef,
$san_login = 'admin', $san_login = 'admin',
@@ -84,6 +91,7 @@ define cinder::backend::san (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/san_thin_provision": value => $san_thin_provision; "${name}/san_thin_provision": value => $san_thin_provision;
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;

View File

@@ -9,6 +9,12 @@
# (optional) The name of the cinder::backend::scaleio ressource # (optional) The name of the cinder::backend::scaleio ressource
# Defaults to $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.
#
# [*sio_login*] # [*sio_login*]
# (required) Administrative user account name used to access the storage # (required) Administrative user account name used to access the storage
# system or proxy server. # system or proxy server.
@@ -109,6 +115,7 @@ define cinder::backend::scaleio (
$sio_storage_pool_name, $sio_storage_pool_name,
$sio_storage_pools, $sio_storage_pools,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$sio_server_port = $::os_service_default, $sio_server_port = $::os_service_default,
$sio_verify_server_certificate = $::os_service_default, $sio_verify_server_certificate = $::os_service_default,
$sio_server_certificate_path = $::os_service_default, $sio_server_certificate_path = $::os_service_default,
@@ -122,6 +129,7 @@ define cinder::backend::scaleio (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver';
"${name}/san_login": value => $sio_login; "${name}/san_login": value => $sio_login;
"${name}/san_password": value => $sio_password, secret => true; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*volume_driver*]
# (optional) Setup cinder-volume to use SolidFire volume driver. # (optional) Setup cinder-volume to use SolidFire volume driver.
# Defaults to 'cinder.volume.drivers.solidfire.SolidFireDriver' # Defaults to 'cinder.volume.drivers.solidfire.SolidFireDriver'
@@ -87,6 +93,7 @@ define cinder::backend::solidfire(
$san_login, $san_login,
$san_password, $san_password,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver', $volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $::os_service_default, $sf_emulate_512 = $::os_service_default,
$sf_allow_tenant_qos = $::os_service_default, $sf_allow_tenant_qos = $::os_service_default,
@@ -106,6 +113,7 @@ define cinder::backend::solidfire(
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;

View File

@@ -8,6 +8,12 @@
# (optional) The name of the cinder::backend::veritas_hyperscale ressource # (optional) The name of the cinder::backend::veritas_hyperscale ressource
# Defaults to $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.
#
# [*extra_options*] # [*extra_options*]
# (optional) Hash of extra options to pass to the backend # (optional) Hash of extra options to pass to the backend
# Defaults to: {} # Defaults to: {}
@@ -31,6 +37,7 @@
define cinder::backend::veritas_hyperscale ( define cinder::backend::veritas_hyperscale (
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$extra_options = {}, $extra_options = {},
$manage_volume_type = false, $manage_volume_type = false,
) { ) {
@@ -39,6 +46,7 @@ define cinder::backend::veritas_hyperscale (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.veritas.vrtshyperscale.HyperScaleDriver';
"${name}/image_volume_cache_enabled": value => true "${name}/image_volume_cache_enabled": value => true
} }

View File

@@ -17,6 +17,12 @@
# Used to set the volume_backend_name in multiple backends. # Used to set the volume_backend_name in multiple backends.
# Defaults to $name as passed in the title. # 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*] # [*api_retry_count*]
# (optional) The number of times we retry on failures, # (optional) The number of times we retry on failures,
# e.g., socket error, etc. # e.g., socket error, etc.
@@ -66,6 +72,7 @@ define cinder::backend::vmdk (
$host_username, $host_username,
$host_password, $host_password,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_folder = 'cinder-volumes', $volume_folder = 'cinder-volumes',
$api_retry_count = $::os_service_default, $api_retry_count = $::os_service_default,
$max_object_retrieval = $::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 { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver';
"${name}/vmware_host_ip": value => $host_ip; "${name}/vmware_host_ip": value => $host_ip;
"${name}/vmware_host_username": value => $host_username; "${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. # (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $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*] # [*shares_config_path*]
# (optional) Shares config file path. # (optional) Shares config file path.
# Defaults to: /etc/cinder/vzstorage_shares # Defaults to: /etc/cinder/vzstorage_shares
@@ -60,6 +66,7 @@ define cinder::backend::vstorage (
$cluster_name, $cluster_name,
$cluster_password, $cluster_password,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$shares_config_path = '/etc/cinder/vzstorage_shares', $shares_config_path = '/etc/cinder/vzstorage_shares',
$use_sparsed_volumes = $::os_service_default, $use_sparsed_volumes = $::os_service_default,
$used_ratio = $::os_service_default, $used_ratio = $::os_service_default,
@@ -76,6 +83,7 @@ define cinder::backend::vstorage (
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${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}/volume_driver": value => 'cinder.volume.drivers.vzstorage.VZStorageDriver';
"${name}/vzstorage_shares_config": value => $shares_config_path; "${name}/vzstorage_shares_config": value => $shares_config_path;
"${name}/vzstorage_sparsed_volumes": value => $use_sparsed_volumes; "${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,6 +22,7 @@ describe 'cinder::backend::bdd' do
should contain_cinder_config('hippo/volume_group').with_value('<SERVICE DEFAULT>') 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/iscsi_protocol').with_value('<SERVICE DEFAULT>')
should contain_cinder_config('hippo/volume_clear').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
end end
@@ -35,6 +36,7 @@ describe 'cinder::backend::bdd' do
:volume_group => 'cinder', :volume_group => 'cinder',
:iscsi_helper => 'lioadm', :iscsi_helper => 'lioadm',
:manage_volume_type => true, :manage_volume_type => true,
:backend_availability_zone => 'my_zone',
}) })
end 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/iscsi_helper').with_value('lioadm')
should contain_cinder_config('hippo/volume_group').with_value('cinder') 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/volume_clear').with_value('zero')
should contain_cinder_config('hippo/backend_availability_zone').with_value('my_zone')
end end
it 'should create type with properties' do it 'should create type with properties' do
should contain_cinder_type('hippo').with(:ensure => :present, :properties => ['volume_backend_name=hippo']) 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 let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>',
:unity_io_ports => '<SERVICE DEFAULT>', :unity_io_ports => '<SERVICE DEFAULT>',
:unity_storage_pool_names => '<SERVICE DEFAULT>', :unity_storage_pool_names => '<SERVICE DEFAULT>',
} }
end 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 let :facts do
OSDefaults.get_facts({}) OSDefaults.get_facts({})
end end
@@ -41,8 +50,14 @@ describe 'cinder::backend::dellemc_unity' do
end end
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' it_configures 'dellemc_unity volume driver'
end end

View File

@@ -25,13 +25,14 @@ describe 'cinder::backend::dellemc_vmax_iscsi' do
describe 'dell emc vmax iscsi backend overriding some parameters' do describe 'dell emc vmax iscsi backend overriding some parameters' do
before :each do before :each do
params.merge!({ params.merge!({
:backend_availability_zone => 'my_zone',
:manage_volume_type => true, :manage_volume_type => true,
}) })
end end
it 'configure dell emc vmax iscsi volume driver' do 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 end
it 'should create type with properties' do it 'should create type with properties' do

View File

@@ -17,12 +17,22 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
let :default_params do let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>',
:xtremio_array_busy_retry_count => 5, :xtremio_array_busy_retry_count => 5,
:xtremio_array_busy_retry_interval => 5, :xtremio_array_busy_retry_interval => 5,
:xtremio_volumes_per_glance_cache => 100, :xtremio_volumes_per_glance_cache => 100,
} }
end 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 let :facts do
OSDefaults.get_facts({}) OSDefaults.get_facts({})
end end
@@ -43,7 +53,14 @@ describe 'cinder::backend::dellemc_xtremio_iscsi' do
end 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' it_configures 'dellemc_xtremio_iscsi volume driver'
end end

View File

@@ -18,6 +18,7 @@ describe 'cinder::backend::dellsc_iscsi' do
let :default_params do let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>',
:dell_sc_api_port => '<SERVICE DEFAULT>', :dell_sc_api_port => '<SERVICE DEFAULT>',
:dell_sc_server_folder => 'srv', :dell_sc_server_folder => 'srv',
:dell_sc_verify_cert => '<SERVICE DEFAULT>', :dell_sc_verify_cert => '<SERVICE DEFAULT>',
@@ -32,6 +33,22 @@ describe 'cinder::backend::dellsc_iscsi' do
} }
end 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 let :facts do
OSDefaults.get_facts({}) OSDefaults.get_facts({})
end end
@@ -53,7 +70,14 @@ describe 'cinder::backend::dellsc_iscsi' do
end 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' it_configures 'dellsc_iscsi volume driver'
end 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_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/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/naviseccli_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/backend_availability_zone').with_value('<SERVICE DEFAULT>')
end end
end end
@@ -44,6 +45,7 @@ describe 'cinder::backend::emc_vnx' do
:naviseccli_path => '/opt/Navisphere/bin/naviseccli', :naviseccli_path => '/opt/Navisphere/bin/naviseccli',
:manage_volume_type => true, :manage_volume_type => true,
:storage_protocol => 'fc', :storage_protocol => 'fc',
:backend_availability_zone => 'my_zone',
}) })
end 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/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/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/storage_protocol').with_value(params[:storage_protocol])
is_expected.to contain_cinder_config('emc/backend_availability_zone').with_value(params[:backend_availability_zone])
end end
it 'should create type with properties' do it 'should create type with properties' do

View File

@@ -7,6 +7,7 @@ describe 'cinder::backend::eqlx' do
let :params do let :params do
{ {
:backend_availability_zone => 'my_zone',
:san_ip => '192.168.100.10', :san_ip => '192.168.100.10',
:san_login => 'grpadmin', :san_login => 'grpadmin',
:san_password => '12345', :san_password => '12345',

View File

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

View File

@@ -12,6 +12,7 @@ describe 'cinder::backend::gpfs' do
let :default_params do let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>',
:gpfs_max_clone_depth => '<SERVICE DEFAULT>', :gpfs_max_clone_depth => '<SERVICE DEFAULT>',
:gpfs_sparse_volumes => '<SERVICE DEFAULT>', :gpfs_sparse_volumes => '<SERVICE DEFAULT>',
:gpfs_storage_pool => '<SERVICE DEFAULT>', :gpfs_storage_pool => '<SERVICE DEFAULT>',
@@ -27,6 +28,7 @@ describe 'cinder::backend::gpfs' do
let :custom_params do let :custom_params do
{ {
:backend_availability_zone => 'my_zone',
:gpfs_max_clone_depth => 1, :gpfs_max_clone_depth => 1,
:gpfs_sparse_volumes => false, :gpfs_sparse_volumes => false,
:gpfs_storage_pool => 'foo', :gpfs_storage_pool => 'foo',

View File

@@ -5,6 +5,7 @@ describe 'cinder::backend::hpe3par_iscsi' do
let :req_params do let :req_params do
{ {
:backend_availability_zone => 'my_zone',
:hpe3par_api_url => 'https://172.0.0.2:8080/api/v1', :hpe3par_api_url => 'https://172.0.0.2:8080/api/v1',
:hpe3par_username => '3paradm', :hpe3par_username => '3paradm',
:hpe3par_password => 'password', :hpe3par_password => 'password',
@@ -22,6 +23,7 @@ describe 'cinder::backend::hpe3par_iscsi' do
describe 'hpe3par_iscsi volume driver' do describe 'hpe3par_iscsi volume driver' do
it 'configure 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/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_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_username').with_value('3paradm')
is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_password').with_value('password') is_expected.to contain_cinder_config('hpe3par_iscsi/hpe3par_password').with_value('password')

View File

@@ -5,6 +5,7 @@ describe 'cinder::backend::hpelefthand_iscsi' do
let :req_params do let :req_params do
{ {
:backend_availability_zone => 'my_zone',
:hpelefthand_api_url => 'https://10.206.219.18:8081/lhos', :hpelefthand_api_url => 'https://10.206.219.18:8081/lhos',
:hpelefthand_username => 'admin', :hpelefthand_username => 'admin',
:hpelefthand_password => 'password', :hpelefthand_password => 'password',
@@ -19,6 +20,7 @@ describe 'cinder::backend::hpelefthand_iscsi' do
describe 'hpelefthand_iscsi volume driver' do describe 'hpelefthand_iscsi volume driver' do
it 'configure 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/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_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_username').with_value('admin')
is_expected.to contain_cinder_config('hpelefthand_iscsi/hpelefthand_password').with_value('password') 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 it 'should configure iscsi driver' do
is_expected.to contain_cinder_config('hippo/volume_backend_name').with( is_expected.to contain_cinder_config('hippo/volume_backend_name').with(
:value => 'hippo') :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( is_expected.to contain_cinder_config('hippo/volume_driver').with(
:value => 'cinder.volume.drivers.lvm.LVMVolumeDriver') :value => 'cinder.volume.drivers.lvm.LVMVolumeDriver')
is_expected.to contain_cinder_config('hippo/iscsi_ip_address').with( 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 let :params do
{ {
:volume_backend_name => 'netapp-cdot-nfs', :volume_backend_name => 'netapp-cdot-nfs',
:backend_availability_zone => 'my_zone',
:netapp_login => 'netapp', :netapp_login => 'netapp',
:netapp_password => 'password', :netapp_password => 'password',
:netapp_server_hostname => '127.0.0.2', :netapp_server_hostname => '127.0.0.2',
@@ -25,6 +26,7 @@ describe 'cinder::backend::netapp' do
let :default_params do let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>',
:netapp_server_port => '80', :netapp_server_port => '80',
:netapp_size_multiplier => '1.2', :netapp_size_multiplier => '1.2',
:netapp_storage_family => 'ontap_cluster', :netapp_storage_family => 'ontap_cluster',

View File

@@ -15,7 +15,9 @@ describe 'cinder::backend::nexenta_edge' do
:nexenta_lun_container => 'cinder', :nexenta_lun_container => 'cinder',
:nexenta_iscsi_service => 'cinder', :nexenta_iscsi_service => 'cinder',
:nexenta_chunksize => '32768', :nexenta_chunksize => '32768',
:volume_driver => 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver' } :volume_driver => 'cinder.volume.drivers.nexenta.nexentaedge.iscsi.NexentaEdgeISCSIDriver',
:backend_availability_zone => '<SERVICE DEFAULT>',
}
end end
let :facts do let :facts do

View File

@@ -19,7 +19,9 @@ describe 'cinder::backend::nexenta' do
:nexenta_blocksize => '8192', :nexenta_blocksize => '8192',
:nexenta_sparse => true, :nexenta_sparse => true,
:nexenta_rest_port => '8457', :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 end
let :facts do let :facts do

View File

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

View File

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

View File

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

View File

@@ -84,15 +84,22 @@ describe 'cinder::backend::rbd' do
end end
end end
context 'override backend_host parameter' do context 'override backend_host and backend_availability_zone parameters' do
before 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 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({ is_expected.to contain_cinder_config('rbd-ssd/backend_host').with({
:value => 'test_host.fqdn.com', :value => 'test_host.fqdn.com',
}) })
is_expected.to contain_cinder_config('rbd-ssd/backend_availability_zone').with({
:value => 'my_zone',
})
end end
end end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -8,6 +8,7 @@ describe 'cinder::backend::vstorage' do
{ {
:cluster_name => 'stor1', :cluster_name => 'stor1',
:cluster_password => 'passw0rd', :cluster_password => 'passw0rd',
:backend_availability_zone => 'my_zone',
:shares_config_path => '/etc/cinder/vstorage_shares.conf', :shares_config_path => '/etc/cinder/vstorage_shares.conf',
:use_sparsed_volumes => true, :use_sparsed_volumes => true,
:used_ratio => '0.9', :used_ratio => '0.9',
@@ -23,6 +24,8 @@ describe 'cinder::backend::vstorage' do
it 'configures vstorage volume driver' do it 'configures vstorage volume driver' do
is_expected.to contain_cinder_config('vstorage/volume_backend_name').with( is_expected.to contain_cinder_config('vstorage/volume_backend_name').with(
:value => 'vstorage') :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( is_expected.to contain_cinder_config('vstorage/volume_driver').with_value(
'cinder.volume.drivers.vzstorage.VZStorageDriver') 'cinder.volume.drivers.vzstorage.VZStorageDriver')
is_expected.to contain_cinder_config('vstorage/vzstorage_shares_config').with_value( is_expected.to contain_cinder_config('vstorage/vzstorage_shares_config').with_value(