Add max_over_subscription_ratio parameter

... to each driver configurations, so that users can customize this
option in individual driver sections.

Note that this option works only when the driver supports thin
provisioning.

Change-Id: I3da6dd142c2ae5967da09787f01cd39052f14f42
This commit is contained in:
Takashi Kajinami 2024-03-17 14:38:44 +09:00
parent 634b6152c1
commit 777dcf40c7
30 changed files with 221 additions and 28 deletions

View File

@ -29,7 +29,7 @@
# This will determine # This will determine
# which Volume Driver will be configured; PowerMaxISCSIDriver or PowerMaxFCDriver. # which Volume Driver will be configured; PowerMaxISCSIDriver or PowerMaxFCDriver.
# Defaults to 'iSCSI' # Defaults to 'iSCSI'
#
# [*volume_backend_name*] # [*volume_backend_name*]
# (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
@ -56,6 +56,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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
@ -82,6 +87,7 @@ define cinder::backend::dellemc_powermax (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
Hash $extra_options = {}, Hash $extra_options = {},
Boolean $manage_volume_type = false, Boolean $manage_volume_type = false,
) { ) {
@ -107,6 +113,7 @@ define cinder::backend::dellemc_powermax (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -42,6 +42,11 @@
# (Optional) Max number of entries allowed in the image volume cache. # (Optional) Max number of entries allowed in the image volume cache.
# Defaults to $facts['os_service_default'], # Defaults to $facts['os_service_default'],
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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
@ -65,6 +70,7 @@ define cinder::backend::dellemc_powerstore (
$image_volume_cache_enabled = $facts['os_service_default'], $image_volume_cache_enabled = $facts['os_service_default'],
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
Boolean $manage_volume_type = false, Boolean $manage_volume_type = false,
Hash $extra_options = {}, Hash $extra_options = {},
) { ) {
@ -79,6 +85,7 @@ define cinder::backend::dellemc_powerstore (
"${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled; "${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled;
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -42,6 +42,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['os_service_default'].
#
# [*unity_io_ports*] # [*unity_io_ports*]
# (optional) A list of iSCSI or FC ports to be used. Each port can be # (optional) A list of iSCSI or FC ports to be used. Each port can be
# Unix-style glob expressions. The Unity Unisphere API port. # Unix-style glob expressions. The Unity Unisphere API port.
@ -74,6 +79,7 @@ define cinder::backend::dellemc_unity (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$unity_io_ports = $facts['os_service_default'], $unity_io_ports = $facts['os_service_default'],
$unity_storage_pool_names = $facts['os_service_default'], $unity_storage_pool_names = $facts['os_service_default'],
Boolean $manage_volume_type = false, Boolean $manage_volume_type = false,
@ -86,6 +92,7 @@ define cinder::backend::dellemc_unity (
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}/backend_availability_zone": value => $backend_availability_zone;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled; "${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled;
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;

View File

@ -43,6 +43,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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 $facts['os_service_default'] # Defaults to $facts['os_service_default']
@ -90,6 +95,7 @@ define cinder::backend::dellemc_xtremio (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$xtremio_array_busy_retry_count = $facts['os_service_default'], $xtremio_array_busy_retry_count = $facts['os_service_default'],
$xtremio_array_busy_retry_interval = $facts['os_service_default'], $xtremio_array_busy_retry_interval = $facts['os_service_default'],
$xtremio_volumes_per_glance_cache = $facts['os_service_default'], $xtremio_volumes_per_glance_cache = $facts['os_service_default'],
@ -115,6 +121,7 @@ define cinder::backend::dellemc_xtremio (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -6,6 +6,15 @@
# #
# == Parameters # == Parameters
# #
# [*san_ip*]
# (required) IP address of SAN controller.
#
# [*san_password*]
# (required) Password of SAN controller.
#
# [*storage_vnx_pool_names*]
# (required) Storage pool names.
#
# [*volume_backend_name*] # [*volume_backend_name*]
# (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
@ -32,19 +41,15 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*san_ip*] # [*max_over_subscription_ratio*]
# (required) IP address of SAN controller. # (Optional) Representation of the over subscription ratio when thin
# # provisionig is involved.
# [*san_password*] # Defaults to $facts['os_service_default'].
# (required) Password of SAN controller.
# #
# [*san_login*] # [*san_login*]
# (optional) Login of SAN controller. # (optional) Login of SAN controller.
# Defaults to : 'admin' # Defaults to : 'admin'
# #
# [*storage_vnx_pool_names*]
# (required) Storage pool names.
#
# [*default_timeout*] # [*default_timeout*]
# (optional) Default timeout for CLI operations in minutes. # (optional) Default timeout for CLI operations in minutes.
# Defaults to: '10' # Defaults to: '10'
@ -141,6 +146,7 @@ define cinder::backend::emc_vnx (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
Hash $extra_options = {}, Hash $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',
@ -176,6 +182,7 @@ define cinder::backend::emc_vnx (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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}/destroy_empty_storage_group": value => $destroy_empty_storage_group; "${name}/destroy_empty_storage_group": value => $destroy_empty_storage_group;

View File

@ -53,6 +53,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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_iscsi.HPE3PARISCSIDriver'. # Defaults to 'cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver'.
@ -101,6 +106,7 @@ define cinder::backend::hpe3par_iscsi(
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['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',
@ -123,6 +129,7 @@ define cinder::backend::hpe3par_iscsi(
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -69,6 +69,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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
@ -97,6 +102,7 @@ define cinder::backend::ibm_svf (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
Hash $extra_options = {}, Hash $extra_options = {},
Boolean $manage_volume_type = false, Boolean $manage_volume_type = false,
) { ) {
@ -117,6 +123,7 @@ define cinder::backend::ibm_svf (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -33,6 +33,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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'.
@ -73,6 +78,7 @@ define cinder::backend::iscsi (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver', $volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $facts['os_service_default'], $volume_group = $facts['os_service_default'],
$volumes_dir = '/var/lib/cinder/volumes', $volumes_dir = '/var/lib/cinder/volumes',
@ -106,6 +112,7 @@ define cinder::backend::iscsi (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/target_ip_address": value => $target_ip_address; "${name}/target_ip_address": value => $target_ip_address;
"${name}/target_helper": value => $target_helper_real; "${name}/target_helper": value => $target_helper_real;

View File

@ -43,6 +43,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['os_service_default'].
#
# [*netapp_server_port*] # [*netapp_server_port*]
# (optional) The TCP port to use for communication with the storage # (optional) The TCP port to use for communication with the storage
# system or proxy. If not specified, Data ONTAP drivers will use 80 # system or proxy. If not specified, Data ONTAP drivers will use 80
@ -192,6 +197,7 @@ define cinder::backend::netapp (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$netapp_server_port = $facts['os_service_default'], $netapp_server_port = $facts['os_service_default'],
$netapp_size_multiplier = $facts['os_service_default'], $netapp_size_multiplier = $facts['os_service_default'],
$netapp_storage_family = $facts['os_service_default'], $netapp_storage_family = $facts['os_service_default'],
@ -237,6 +243,7 @@ and will be removed in a future release.")
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -27,6 +27,11 @@
# (Optional) Max number of entries allowed in the image volume cache. # (Optional) Max number of entries allowed in the image volume cache.
# Defaults to $facts['os_service_default'], # Defaults to $facts['os_service_default'],
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['os_service_default'].
#
# [*nfs_mount_attempts*] # [*nfs_mount_attempts*]
# (optional) The number of attempts to mount nfs shares before raising an # (optional) The number of attempts to mount nfs shares before raising an
# error. At least one attempt will be made to mount an nfs share, regardless # error. At least one attempt will be made to mount an nfs share, regardless
@ -107,6 +112,7 @@ define cinder::backend::nfs (
$image_volume_cache_enabled = $facts['os_service_default'], $image_volume_cache_enabled = $facts['os_service_default'],
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$nfs_mount_attempts = $facts['os_service_default'], $nfs_mount_attempts = $facts['os_service_default'],
$nfs_mount_options = $facts['os_service_default'], $nfs_mount_options = $facts['os_service_default'],
$nfs_sparsed_volumes = $facts['os_service_default'], $nfs_sparsed_volumes = $facts['os_service_default'],
@ -136,6 +142,7 @@ define cinder::backend::nfs (
"${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled; "${name}/image_volume_cache_enabled": value => $image_volume_cache_enabled;
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${name}/volume_driver": value => 'cinder.volume.drivers.nfs.NfsDriver'; "${name}/volume_driver": value => 'cinder.volume.drivers.nfs.NfsDriver';
"${name}/nfs_shares_config": value => $nfs_shares_config; "${name}/nfs_shares_config": value => $nfs_shares_config;
"${name}/nfs_mount_attempts": value => $nfs_mount_attempts; "${name}/nfs_mount_attempts": value => $nfs_mount_attempts;

View File

@ -54,6 +54,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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'.
@ -88,6 +93,7 @@ define cinder::backend::nvmeof (
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver', $volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $facts['os_service_default'], $volume_group = $facts['os_service_default'],
$nvmeof_conn_info_version = $facts['os_service_default'], $nvmeof_conn_info_version = $facts['os_service_default'],
@ -112,6 +118,7 @@ define cinder::backend::nvmeof (
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/volume_group": value => $volume_group; "${name}/volume_group": value => $volume_group;
"${name}/nvmeof_conn_info_version": value => $nvmeof_conn_info_version; "${name}/nvmeof_conn_info_version": value => $nvmeof_conn_info_version;
@ -119,16 +126,19 @@ define cinder::backend::nvmeof (
"${name}/target_secondary_ip_addresses": value => join(any2array($target_secondary_ip_addresses), ','); "${name}/target_secondary_ip_addresses": value => join(any2array($target_secondary_ip_addresses), ',');
} }
ensure_packages ( 'nvmetcli', { if $::cinder::params::nvmetcli_package_name {
ensure => present, ensure_packages ( 'nvmetcli', {
name => 'nvmetcli', ensure => present,
tag => 'cinder-support-package', name => $::cinder::params::nvmetcli_package_name,
}) tag => 'cinder-support-package',
})
} else {
warning('The nvmetcli package is not available in this operating system.')
}
ensure_packages ( 'nvme-cli', { ensure_packages ( 'nvme-cli', {
ensure => present, ensure => present,
name => 'nvme-cli', name => $::cinder::params::nvme_cli_package_name,
tag => 'cinder-support-package', tag => 'cinder-support-package',
}) })
} }

View File

@ -25,6 +25,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['os_service_default'].
#
# [*pure_storage_protocol*] # [*pure_storage_protocol*]
# (optional) Must be either 'iSCSI', 'FC' or 'NVMe'. This will determine # (optional) Must be either 'iSCSI', 'FC' or 'NVMe'. This will determine
# which Volume Driver will be configured; PureISCSIDriver, PureFCDriver # which Volume Driver will be configured; PureISCSIDriver, PureFCDriver
@ -109,6 +114,7 @@ define cinder::backend::pure(
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $facts['os_service_default'], $backend_availability_zone = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
Enum['iSCSI', 'FC', 'NVMe'] $pure_storage_protocol = 'iSCSI', Enum['iSCSI', 'FC', 'NVMe'] $pure_storage_protocol = 'iSCSI',
$use_chap_auth = $facts['os_service_default'], $use_chap_auth = $facts['os_service_default'],
$use_multipath_for_image_xfer = true, $use_multipath_for_image_xfer = true,
@ -138,6 +144,7 @@ define cinder::backend::pure(
"${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}/backend_availability_zone": value => $backend_availability_zone;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -31,6 +31,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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'
@ -115,6 +120,7 @@ define cinder::backend::rbd (
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $facts['os_service_default'], $backend_availability_zone = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$rbd_ceph_conf = '/etc/ceph/ceph.conf', $rbd_ceph_conf = '/etc/ceph/ceph.conf',
$rbd_flatten_volume_from_snapshot = $facts['os_service_default'], $rbd_flatten_volume_from_snapshot = $facts['os_service_default'],
$rbd_secret_uuid = $facts['os_service_default'], $rbd_secret_uuid = $facts['os_service_default'],
@ -148,6 +154,7 @@ define cinder::backend::rbd (
"${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}/backend_availability_zone": value => $backend_availability_zone;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -31,6 +31,11 @@
# (Optional) The percentage of backend capacity is reserved. # (Optional) The percentage of backend capacity is reserved.
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
# #
# [*max_over_subscription_ratio*]
# (Optional) Representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to $facts['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'
@ -125,6 +130,7 @@ define cinder::backend::solidfire(
$image_volume_cache_max_size_gb = $facts['os_service_default'], $image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'], $image_volume_cache_max_count = $facts['os_service_default'],
$reserved_percentage = $facts['os_service_default'], $reserved_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver', $volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $facts['os_service_default'], $sf_emulate_512 = $facts['os_service_default'],
$sf_allow_tenant_qos = $facts['os_service_default'], $sf_allow_tenant_qos = $facts['os_service_default'],
@ -152,6 +158,7 @@ define cinder::backend::solidfire(
"${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb; "${name}/image_volume_cache_max_size_gb": value => $image_volume_cache_max_size_gb;
"${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count; "${name}/image_volume_cache_max_count": value => $image_volume_cache_max_count;
"${name}/reserved_percentage": value => $reserved_percentage; "${name}/reserved_percentage": value => $reserved_percentage;
"${name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
"${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

@ -31,6 +31,8 @@ class cinder::params {
$lock_path = '/var/lock/cinder' $lock_path = '/var/lock/cinder'
$cinder_wsgi_script_path = '/usr/lib/cgi-bin/cinder' $cinder_wsgi_script_path = '/usr/lib/cgi-bin/cinder'
$pywbem_package_name = 'python-pywbem' $pywbem_package_name = 'python-pywbem'
$nvme_cli_package_name = 'nvme-cli'
$nvmetcli_package_name = undef
} }
'RedHat': { 'RedHat': {
$package_name = 'openstack-cinder' $package_name = 'openstack-cinder'
@ -52,6 +54,8 @@ class cinder::params {
$lock_path = '/var/lib/cinder/tmp' $lock_path = '/var/lib/cinder/tmp'
$cinder_wsgi_script_path = '/var/www/cgi-bin/cinder' $cinder_wsgi_script_path = '/var/www/cgi-bin/cinder'
$pywbem_package_name = 'pywbem' $pywbem_package_name = 'pywbem'
$nvme_cli_package_name = 'nvme-cli'
$nvmetcli_package_name = 'nvmetcli'
} }
default: { default: {
fail("Unsupported osfamily: ${facts['os']['family']}") fail("Unsupported osfamily: ${facts['os']['family']}")

View File

@ -0,0 +1,20 @@
---
features:
- |
The ``max_over_subscription_ratio`` parameter has been added to
the following defined resource types.
- ``cinder::backend::dellemc_powermax``
- ``cinder::backend::dellemc_powerstore``
- ``cinder::backend::dellemc_unity``
- ``cinder::backend::dellemc_xtremio``
- ``cinder::backend::emc_vnx``
- ``cinder::backend::hpe3par_iscsi``
- ``cinder::backend::ibm_svf``
- ``cinder::backend::iscsi``
- ``cinder::backend::netapp``
- ``cinder::backend::nvmeof``
- ``cinder::backend::nfs``
- ``cinder::backend::pure``
- ``cinder::backend::rbd``
- ``cinder::backend::solidfire``

View File

@ -31,6 +31,7 @@ describe 'cinder::backend::dellemc_powermax' do
is_expected.to contain_cinder_config("#{title}/powermax_port_groups").with_value('[OS-ISCSI-PG]') is_expected.to contain_cinder_config("#{title}/powermax_port_groups").with_value('[OS-ISCSI-PG]')
is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/max_over_subscription_ratio").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/image_volume_cache_enabled").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/image_volume_cache_enabled").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_size_gb").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_size_gb").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_count").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_count").with_value('<SERVICE DEFAULT>')
@ -86,14 +87,16 @@ describe 'cinder::backend::dellemc_powermax' do
context 'with parameters' do context 'with parameters' do
before do before do
params.merge!({ params.merge!({
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
}) })
end end
it 'should configure the customized values' do it 'should configure the customized values' do
is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('my_zone') is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('my_zone')
is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value(10) is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value(10)
is_expected.to contain_cinder_config("#{title}/max_over_subscription_ratio").with_value(1.5)
end end
end end

View File

@ -20,6 +20,7 @@ describe 'cinder::backend::dellemc_powerstore' do
:image_volume_cache_enabled => '<SERVICE DEFAULT>', :image_volume_cache_enabled => '<SERVICE DEFAULT>',
:image_volume_cache_max_size_gb => '<SERVICE DEFAULT>', :image_volume_cache_max_size_gb => '<SERVICE DEFAULT>',
:image_volume_cache_max_count => '<SERVICE DEFAULT>', :image_volume_cache_max_count => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
:storage_protocol => 'iSCSI' , :storage_protocol => 'iSCSI' ,
} }
end end
@ -31,6 +32,7 @@ describe 'cinder::backend::dellemc_powerstore' do
:image_volume_cache_enabled => true, :image_volume_cache_enabled => true,
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:max_over_subscription_ratio => 1.5,
:storage_protocol => 'iSCSI' , :storage_protocol => 'iSCSI' ,
} }
end end

View File

@ -21,6 +21,7 @@ describe 'cinder::backend::dellemc_unity' do
:image_volume_cache_max_size_gb => '<SERVICE DEFAULT>', :image_volume_cache_max_size_gb => '<SERVICE DEFAULT>',
:image_volume_cache_max_count => '<SERVICE DEFAULT>', :image_volume_cache_max_count => '<SERVICE DEFAULT>',
:reserved_percentage => '<SERVICE DEFAULT>', :reserved_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
:unity_io_ports => '<SERVICE DEFAULT>', :unity_io_ports => '<SERVICE DEFAULT>',
:unity_storage_pool_names => '<SERVICE DEFAULT>', :unity_storage_pool_names => '<SERVICE DEFAULT>',
} }
@ -33,6 +34,7 @@ describe 'cinder::backend::dellemc_unity' do
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
:unity_io_ports => '1,42,66', :unity_io_ports => '1,42,66',
:unity_storage_pool_names => 'pool_1,pool_2', :unity_storage_pool_names => 'pool_1,pool_2',
} }

View File

@ -21,6 +21,7 @@ describe 'cinder::backend::dellemc_xtremio' do
:image_volume_cache_max_size_gb => '<SERVICE DEFAULT>', :image_volume_cache_max_size_gb => '<SERVICE DEFAULT>',
:image_volume_cache_max_count => '<SERVICE DEFAULT>', :image_volume_cache_max_count => '<SERVICE DEFAULT>',
:reserved_percentage => '<SERVICE DEFAULT>', :reserved_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
:xtremio_array_busy_retry_count => '<SERVICE DEFAULT>', :xtremio_array_busy_retry_count => '<SERVICE DEFAULT>',
:xtremio_array_busy_retry_interval => '<SERVICE DEFAULT>', :xtremio_array_busy_retry_interval => '<SERVICE DEFAULT>',
:xtremio_volumes_per_glance_cache => '<SERVICE DEFAULT>', :xtremio_volumes_per_glance_cache => '<SERVICE DEFAULT>',
@ -35,6 +36,7 @@ describe 'cinder::backend::dellemc_xtremio' do
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
:xtremio_array_busy_retry_count => 15, :xtremio_array_busy_retry_count => 15,
:xtremio_array_busy_retry_interval => 6, :xtremio_array_busy_retry_interval => 6,
:xtremio_volumes_per_glance_cache => 100, :xtremio_volumes_per_glance_cache => 100,

View File

@ -41,6 +41,7 @@ describe 'cinder::backend::emc_vnx' do
is_expected.to contain_cinder_config('emc/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('emc/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('emc/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/reserved_percentage').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('emc/reserved_percentage').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('emc/max_over_subscription_ratio').with_value('<SERVICE DEFAULT>')
} }
end end
@ -66,6 +67,7 @@ describe 'cinder::backend::emc_vnx' do
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
}) })
end end
@ -88,6 +90,7 @@ describe 'cinder::backend::emc_vnx' do
is_expected.to contain_cinder_config('emc/image_volume_cache_max_size_gb').with_value(params[:image_volume_cache_max_size_gb]) is_expected.to contain_cinder_config('emc/image_volume_cache_max_size_gb').with_value(params[:image_volume_cache_max_size_gb])
is_expected.to contain_cinder_config('emc/image_volume_cache_max_count').with_value(params[:image_volume_cache_max_count]) is_expected.to contain_cinder_config('emc/image_volume_cache_max_count').with_value(params[:image_volume_cache_max_count])
is_expected.to contain_cinder_config('emc/reserved_percentage').with_value(params[:reserved_percentage]) is_expected.to contain_cinder_config('emc/reserved_percentage').with_value(params[:reserved_percentage])
is_expected.to contain_cinder_config('emc/max_over_subscription_ratio').with_value(1.5)
} }
it { is_expected.to contain_cinder_type('emc').with( it { is_expected.to contain_cinder_type('emc').with(

View File

@ -28,6 +28,7 @@ describe 'cinder::backend::hpe3par_iscsi' do
is_expected.to contain_cinder_config('hpe3par_iscsi/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hpe3par_iscsi/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hpe3par_iscsi/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hpe3par_iscsi/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hpe3par_iscsi/reserved_percentage').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hpe3par_iscsi/reserved_percentage').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hpe3par_iscsi/max_over_subscription_ratio').with_value('<SERVICE DEFAULT>')
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')
@ -41,13 +42,15 @@ describe 'cinder::backend::hpe3par_iscsi' do
context 'with parameters' do context 'with parameters' do
before :each do before :each do
params.merge!({ params.merge!({
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
}) })
end end
it { it {
is_expected.to contain_cinder_config('hpe3par_iscsi/backend_availability_zone').with_value('my_zone') is_expected.to contain_cinder_config('hpe3par_iscsi/backend_availability_zone').with_value('my_zone')
is_expected.to contain_cinder_config('hpe3par_iscsi/reserved_percentage').with_value(10) is_expected.to contain_cinder_config('hpe3par_iscsi/reserved_percentage').with_value(10)
is_expected.to contain_cinder_config('hpe3par_iscsi/max_over_subscription_ratio').with_value(1.5)
} }
end end

View File

@ -34,6 +34,7 @@ describe 'cinder::backend::ibm_svf' do
is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_size_gb").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_size_gb").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_count").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/image_volume_cache_max_count").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{title}/max_over_subscription_ratio").with_value('<SERVICE DEFAULT>')
end end
end end
@ -62,14 +63,16 @@ describe 'cinder::backend::ibm_svf' do
context 'with parameters' do context 'with parameters' do
before do before do
params.merge!( params.merge!(
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
) )
end end
it 'should configure the customized values' do it 'should configure the customized values' do
is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('my_zone') is_expected.to contain_cinder_config("#{title}/backend_availability_zone").with_value('my_zone')
is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value(10) is_expected.to contain_cinder_config("#{title}/reserved_percentage").with_value(10)
is_expected.to contain_cinder_config("#{title}/max_over_subscription_ratio").with_value(1.5)
end end
end end

View File

@ -12,6 +12,7 @@ describe 'cinder::backend::iscsi' do
is_expected.to contain_cinder_config('hippo/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/reserved_percentage').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/reserved_percentage').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/max_over_subscription_ratio').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/volume_driver').with_value('cinder.volume.drivers.lvm.LVMVolumeDriver')
is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/target_helper').with_value(platform_params[:target_helper]) is_expected.to contain_cinder_config('hippo/target_helper').with_value(platform_params[:target_helper])
@ -29,6 +30,7 @@ describe 'cinder::backend::iscsi' do
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
:target_ip_address => '192.0.2.1', :target_ip_address => '192.0.2.1',
:volume_group => 'volumegroup', :volume_group => 'volumegroup',
:volumes_dir => '/etc/cinder/volumes', :volumes_dir => '/etc/cinder/volumes',
@ -41,6 +43,7 @@ describe 'cinder::backend::iscsi' do
is_expected.to contain_cinder_config('hippo/image_volume_cache_max_size_gb').with_value(100) is_expected.to contain_cinder_config('hippo/image_volume_cache_max_size_gb').with_value(100)
is_expected.to contain_cinder_config('hippo/image_volume_cache_max_count').with_value(101) is_expected.to contain_cinder_config('hippo/image_volume_cache_max_count').with_value(101)
is_expected.to contain_cinder_config('hippo/reserved_percentage').with_value(10) is_expected.to contain_cinder_config('hippo/reserved_percentage').with_value(10)
is_expected.to contain_cinder_config('hippo/max_over_subscription_ratio').with_value(1.5)
is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('192.0.2.1') is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('192.0.2.1')
is_expected.to contain_cinder_config('hippo/volume_group').with_value('volumegroup') is_expected.to contain_cinder_config('hippo/volume_group').with_value('volumegroup')
is_expected.to contain_cinder_config('hippo/volumes_dir').with_value('/etc/cinder/volumes') is_expected.to contain_cinder_config('hippo/volumes_dir').with_value('/etc/cinder/volumes')

View File

@ -21,6 +21,7 @@ describe 'cinder::backend::netapp' do
:image_volume_cache_max_size_gb => '<SERVICE DEFAULT>', :image_volume_cache_max_size_gb => '<SERVICE DEFAULT>',
:image_volume_cache_max_count => '<SERVICE DEFAULT>', :image_volume_cache_max_count => '<SERVICE DEFAULT>',
:reserved_percentage => '<SERVICE DEFAULT>', :reserved_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
:netapp_server_port => '<SERVICE DEFAULT>', :netapp_server_port => '<SERVICE DEFAULT>',
:netapp_size_multiplier => '<SERVICE DEFAULT>', :netapp_size_multiplier => '<SERVICE DEFAULT>',
:netapp_storage_family => '<SERVICE DEFAULT>', :netapp_storage_family => '<SERVICE DEFAULT>',

View File

@ -15,6 +15,7 @@ describe 'cinder::backend::nfs' do
is_expected.to contain_cinder_config('hippo/volume_backend_name').with_value('hippo') 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/backend_availability_zone').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/volume_driver').with_value('cinder.volume.drivers.nfs.NfsDriver') is_expected.to contain_cinder_config('hippo/volume_driver').with_value('cinder.volume.drivers.nfs.NfsDriver')
is_expected.to contain_cinder_config('hippo/max_over_subscription_ratio').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value('/etc/cinder/shares.conf') is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value('/etc/cinder/shares.conf')
is_expected.to contain_cinder_config('hippo/nfs_mount_attempts').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/nfs_mount_attempts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/nfs_mount_options').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('hippo/nfs_mount_options').with_value('<SERVICE DEFAULT>')
@ -39,6 +40,7 @@ describe 'cinder::backend::nfs' do
before :each do before :each do
params.merge!({ params.merge!({
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:max_over_subscription_ratio => 1.5,
:nfs_mount_attempts => '4', :nfs_mount_attempts => '4',
:nfs_mount_options => 'vers=3', :nfs_mount_options => 'vers=3',
:nfs_shares_config => '/etc/cinder/other_shares.conf', :nfs_shares_config => '/etc/cinder/other_shares.conf',
@ -57,6 +59,7 @@ describe 'cinder::backend::nfs' do
is_expected.to contain_cinder_config('hippo/volume_backend_name').with_value('hippo') 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/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/volume_driver').with_value('cinder.volume.drivers.nfs.NfsDriver')
is_expected.to contain_cinder_config('hippo/max_over_subscription_ratio').with_value(1.5)
is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value('/etc/cinder/other_shares.conf') is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value('/etc/cinder/other_shares.conf')
is_expected.to contain_cinder_config('hippo/nfs_mount_attempts').with_value('4') is_expected.to contain_cinder_config('hippo/nfs_mount_attempts').with_value('4')
is_expected.to contain_cinder_config('hippo/nfs_mount_options').with_value('vers=3') is_expected.to contain_cinder_config('hippo/nfs_mount_options').with_value('vers=3')

View File

@ -30,20 +30,41 @@ describe 'cinder::backend::nvmeof' do
is_expected.to contain_cinder_config('nvme-backend/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/reserved_percentage').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/reserved_percentage').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/max_over_subscription_ratio').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/volume_driver').with_value('cinder.volume.drivers.lvm.LVMVolumeDriver') is_expected.to contain_cinder_config('nvme-backend/volume_driver').with_value('cinder.volume.drivers.lvm.LVMVolumeDriver')
is_expected.to contain_cinder_config('nvme-backend/nvmeof_conn_info_version').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/nvmeof_conn_info_version').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/lvm_share_target').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/lvm_share_target').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('nvme-backend/target_secondary_ip_addresses').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('nvme-backend/target_secondary_ip_addresses').with_value('<SERVICE DEFAULT>')
} }
end
end
shared_examples 'cinder::backend::nvmeof in RedHat' do
context 'with default params' do
it { is_expected.to contain_package('nvmetcli').with( it { is_expected.to contain_package('nvmetcli').with(
:name => 'nvmetcli', :name => platform_params[:nvmetcli_package_name],
:ensure => 'installed', :ensure => 'installed',
:tag => 'cinder-support-package', :tag => 'cinder-support-package',
)} )}
it { is_expected.to contain_package('nvme-cli').with( it { is_expected.to contain_package('nvme-cli').with(
:name => 'nvme-cli', :name => platform_params[:nvme_cli_package_name],
:ensure => 'installed',
:tag => 'cinder-support-package',
)}
end
end
shared_examples 'cinder::backend::nvmeof in Debian' do
context 'with default params' do
it { is_expected.to contain_package('nvmetcli').with(
:name => platform_params[:nvmetcli_package_name],
:ensure => 'installed',
:tag => 'cinder-support-package',
)}
it { is_expected.to contain_package('nvme-cli').with(
:name => platform_params[:nvme_cli_package_name],
:ensure => 'installed', :ensure => 'installed',
:tag => 'cinder-support-package', :tag => 'cinder-support-package',
)} )}
@ -58,6 +79,20 @@ describe 'cinder::backend::nvmeof' do
facts.merge!(OSDefaults.get_facts()) facts.merge!(OSDefaults.get_facts())
end end
let :platform_params do
case facts[:os]['family']
when 'Debian'
{
:nvme_cli_package_name => 'nvme-cli',
}
when 'RedHat'
{
:nvme_cli_package_name => 'nvme-cli',
:nvmetcli_package_name => 'nvmetcli',
}
end
end
it_behaves_like 'cinder::backend::nvmeof' it_behaves_like 'cinder::backend::nvmeof'
end end
end end

View File

@ -23,6 +23,7 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('pure/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('pure/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/reserved_percentage').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('pure/reserved_percentage').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/max_over_subscription_ratio').with_value('<SERVICE DEFAULT>')
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')
@ -37,10 +38,11 @@ describe 'cinder::backend::pure' do
context 'pure iscsi volume driver' do context 'pure iscsi volume driver' do
let :params do let :params do
req_params.merge({ req_params.merge({
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:reserved_percentage => 10, :reserved_percentage => 10,
:pure_storage_protocol => 'iSCSI', :max_over_subscription_ratio => 1.5,
:use_chap_auth => 'true', :pure_storage_protocol => 'iSCSI',
:use_chap_auth => 'true',
}) })
end end
@ -51,6 +53,7 @@ describe 'cinder::backend::pure' do
is_expected.to contain_cinder_config('pure/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('pure/image_volume_cache_max_size_gb').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config('pure/image_volume_cache_max_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('pure/reserved_percentage').with_value(10) is_expected.to contain_cinder_config('pure/reserved_percentage').with_value(10)
is_expected.to contain_cinder_config('pure/max_over_subscription_ratio').with_value(1.5)
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

@ -32,6 +32,7 @@ describe 'cinder::backend::rbd' do
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('rbd:'"#{req_params[:rbd_pool]}") is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('rbd:'"#{req_params[:rbd_pool]}")
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_availability_zone").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_availability_zone").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/reserved_percentage").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/reserved_percentage").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/max_over_subscription_ratio").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connect_timeout").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connect_timeout").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value('<SERVICE DEFAULT>') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value('<SERVICE DEFAULT>')
@ -51,6 +52,7 @@ describe 'cinder::backend::rbd' do
:backend_host => 'test_host.fqdn.com', :backend_host => 'test_host.fqdn.com',
:backend_availability_zone => 'my_zone', :backend_availability_zone => 'my_zone',
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
:rbd_ceph_conf => '/opt/ceph.conf', :rbd_ceph_conf => '/opt/ceph.conf',
:rbd_flatten_volume_from_snapshot => true, :rbd_flatten_volume_from_snapshot => true,
:rbd_secret_uuid => 'b129523a-61a5-4653-86d1-2b055f970801', :rbd_secret_uuid => 'b129523a-61a5-4653-86d1-2b055f970801',
@ -81,6 +83,7 @@ describe 'cinder::backend::rbd' do
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('test_host.fqdn.com') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('test_host.fqdn.com')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_availability_zone").with_value('my_zone') is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_availability_zone").with_value('my_zone')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/reserved_percentage").with_value(10) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/reserved_percentage").with_value(10)
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/max_over_subscription_ratio").with_value(1.5)
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connect_timeout").with_value(params[:rados_connect_timeout]) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connect_timeout").with_value(params[:rados_connect_timeout])
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value(params[:rados_connection_interval]) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value(params[:rados_connection_interval])
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value(params[:rados_connection_retries]) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value(params[:rados_connection_retries])

View File

@ -20,6 +20,7 @@ describe 'cinder::backend::solidfire' do
:image_volume_cache_max_size_gb => '<SERVICE DEFAULT>', :image_volume_cache_max_size_gb => '<SERVICE DEFAULT>',
:image_volume_cache_max_count => '<SERVICE DEFAULT>', :image_volume_cache_max_count => '<SERVICE DEFAULT>',
:reserved_percentage => '<SERVICE DEFAULT>', :reserved_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<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>',
@ -43,6 +44,7 @@ describe 'cinder::backend::solidfire' do
:image_volume_cache_max_size_gb => 100, :image_volume_cache_max_size_gb => 100,
:image_volume_cache_max_count => 101, :image_volume_cache_max_count => 101,
:reserved_percentage => 10, :reserved_percentage => 10,
:max_over_subscription_ratio => 1.5,
:sf_emulate_512 => true, :sf_emulate_512 => true,
:sf_allow_tenant_qos => false, :sf_allow_tenant_qos => false,
:sf_account_prefix => 'acc_prefix', :sf_account_prefix => 'acc_prefix',