From 3897092b5a3a0b6aa4618030d0fe7fa4ddabe71d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 2 Apr 2022 01:58:57 +0900 Subject: [PATCH] Solidfire: Improve parameter coverage This change introduces some new parameters to the defined type for solidfire backend, so that users can manage tunable parameters by puppet. Change-Id: I34a8103b30091f78719a7675e10046e7578af5d1 --- manifests/backend/solidfire.pp | 94 +++++++++++++------ .../solidfire-opts-608d3135644f195e.yaml | 12 +++ spec/defines/cinder_backend_solidfire_spec.rb | 44 +++++---- 3 files changed, 107 insertions(+), 43 deletions(-) create mode 100644 releasenotes/notes/solidfire-opts-608d3135644f195e.yaml diff --git a/manifests/backend/solidfire.pp b/manifests/backend/solidfire.pp index 6b20126d..c6a60900 100644 --- a/manifests/backend/solidfire.pp +++ b/manifests/backend/solidfire.pp @@ -59,6 +59,34 @@ # (optional) Utilize volume access groups on a per-tenant basis. # Defaults to $::os_service_default # +# [*sf_provisioning_calc*] +# (optional) Change how SolidFire reports used space and provisioning +# calculations. +# Defaults to $::os_service_default +# +# [*sf_cluster_pairing_timeout*] +# (optional) Sets time in seconds to wait for cluster to complete paring. +# Defaults to $::os_service_default +# +# [*sf_volume_pairing_timeout*] +# (optional) Sets time in seconds to wait for a migrating volume to complete +# paring and sync. +# Defaults to $::os_service_default +# +# [*sf_api_request_timeout*] +# (optional) Sets time in seconds to wait for an api request to complete. +# Defaults to $::os_service_default +# +# [*sf_volume_clone_timeout*] +# (optional) Sets time in seconds to wait for a clone of a volume or snapshot +# to complete. +# Defaults to $::os_service_default +# +# [*sf_volume_create_timeout*] +# (optional) Sets time in seconds to wait for a create volume operation to +# complete. +# Defaults to $::os_service_default +# # [*manage_volume_type*] # (Optional) Whether or not manage Cinder Volume type. # If set to true, a Cinder Volume type will be created @@ -88,21 +116,27 @@ define cinder::backend::solidfire( $san_ip, $san_login, $san_password, - $volume_backend_name = $name, - $backend_availability_zone = $::os_service_default, - $volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver', - $sf_emulate_512 = $::os_service_default, - $sf_allow_tenant_qos = $::os_service_default, - $sf_account_prefix = $::os_service_default, - $sf_api_port = $::os_service_default, - $sf_volume_prefix = $::os_service_default, - $sf_svip = $::os_service_default, - $sf_enable_vag = $::os_service_default, - $manage_volume_type = false, - $extra_options = {}, + $volume_backend_name = $name, + $backend_availability_zone = $::os_service_default, + $volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver', + $sf_emulate_512 = $::os_service_default, + $sf_allow_tenant_qos = $::os_service_default, + $sf_account_prefix = $::os_service_default, + $sf_api_port = $::os_service_default, + $sf_volume_prefix = $::os_service_default, + $sf_svip = $::os_service_default, + $sf_enable_vag = $::os_service_default, + $sf_provisioning_calc = $::os_service_default, + $sf_cluster_pairing_timeout = $::os_service_default, + $sf_volume_pairing_timeout = $::os_service_default, + $sf_api_request_timeout = $::os_service_default, + $sf_volume_clone_timeout = $::os_service_default, + $sf_volume_create_timeout = $::os_service_default, + $manage_volume_type = false, + $extra_options = {}, # DEPRECATED PARAMETERS - $sf_template_account_name = undef, - $sf_allow_template_caching = undef, + $sf_template_account_name = undef, + $sf_allow_template_caching = undef, ) { include cinder::deps @@ -119,19 +153,25 @@ define cinder::backend::solidfire( } cinder_config { - "${name}/volume_backend_name": value => $volume_backend_name; - "${name}/backend_availability_zone": value => $backend_availability_zone; - "${name}/volume_driver": value => $volume_driver; - "${name}/san_ip": value => $san_ip; - "${name}/san_login": value => $san_login; - "${name}/san_password": value => $san_password, secret => true; - "${name}/sf_emulate_512": value => $sf_emulate_512; - "${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos; - "${name}/sf_account_prefix": value => $sf_account_prefix; - "${name}/sf_api_port": value => $sf_api_port; - "${name}/sf_volume_prefix": value => $sf_volume_prefix; - "${name}/sf_svip": value => $sf_svip; - "${name}/sf_enable_vag": value => $sf_enable_vag; + "${name}/volume_backend_name": value => $volume_backend_name; + "${name}/backend_availability_zone": value => $backend_availability_zone; + "${name}/volume_driver": value => $volume_driver; + "${name}/san_ip": value => $san_ip; + "${name}/san_login": value => $san_login; + "${name}/san_password": value => $san_password, secret => true; + "${name}/sf_emulate_512": value => $sf_emulate_512; + "${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos; + "${name}/sf_account_prefix": value => $sf_account_prefix; + "${name}/sf_api_port": value => $sf_api_port; + "${name}/sf_volume_prefix": value => $sf_volume_prefix; + "${name}/sf_svip": value => $sf_svip; + "${name}/sf_enable_vag": value => $sf_enable_vag; + "${name}/sf_provisioning_calc": value => $sf_provisioning_calc; + "${name}/sf_cluster_pairing_timeout": value => $sf_cluster_pairing_timeout; + "${name}/sf_volume_pairing_timeout": value => $sf_volume_pairing_timeout; + "${name}/sf_api_request_timeout": value => $sf_api_request_timeout; + "${name}/sf_volume_clone_timeout": value => $sf_volume_clone_timeout; + "${name}/sf_volume_create_timeout": value => $sf_volume_create_timeout; } if $manage_volume_type { diff --git a/releasenotes/notes/solidfire-opts-608d3135644f195e.yaml b/releasenotes/notes/solidfire-opts-608d3135644f195e.yaml new file mode 100644 index 00000000..20df462b --- /dev/null +++ b/releasenotes/notes/solidfire-opts-608d3135644f195e.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + The ``cinder::backend::solidfire`` defined type now supports the following + new parameters. + + - ``sf_provisioning_calc`` + - ``sf_cluster_pairing_timeout`` + - ``sf_volume_pairing_timeout`` + - ``sf_api_request_timeout`` + - ``sf_volume_clone_timeout`` + - ``sf_volume_create_timeout`` diff --git a/spec/defines/cinder_backend_solidfire_spec.rb b/spec/defines/cinder_backend_solidfire_spec.rb index 6872172e..32cdc1b7 100644 --- a/spec/defines/cinder_backend_solidfire_spec.rb +++ b/spec/defines/cinder_backend_solidfire_spec.rb @@ -15,27 +15,39 @@ describe 'cinder::backend::solidfire' do let :default_params do { - :backend_availability_zone => '', - :sf_emulate_512 => '', - :sf_allow_tenant_qos => '', - :sf_account_prefix => '', - :sf_api_port => '', - :sf_volume_prefix => '', - :sf_svip => '', - :sf_enable_vag => '', + :backend_availability_zone => '', + :sf_emulate_512 => '', + :sf_allow_tenant_qos => '', + :sf_account_prefix => '', + :sf_api_port => '', + :sf_volume_prefix => '', + :sf_svip => '', + :sf_enable_vag => '', + :sf_provisioning_calc => '', + :sf_cluster_pairing_timeout => '', + :sf_volume_pairing_timeout => '', + :sf_api_request_timeout => '', + :sf_volume_clone_timeout => '', + :sf_volume_create_timeout => '', } end let :other_params do { - :backend_availability_zone => 'az1', - :sf_emulate_512 => true, - :sf_allow_tenant_qos => false, - :sf_account_prefix => 'acc_prefix', - :sf_api_port => 443, - :sf_volume_prefix => 'UUID-', - :sf_svip => 'svip', - :sf_enable_vag => false, + :backend_availability_zone => 'az1', + :sf_emulate_512 => true, + :sf_allow_tenant_qos => false, + :sf_account_prefix => 'acc_prefix', + :sf_api_port => 443, + :sf_volume_prefix => 'UUID-', + :sf_svip => 'svip', + :sf_enable_vag => false, + :sf_provisioning_calc => 'maxProvisionedSpace', + :sf_cluster_pairing_timeout => 60, + :sf_volume_pairing_timeout => 3600, + :sf_api_request_timeout => 30, + :sf_volume_clone_timeout => 600, + :sf_volume_create_timeout => 60, } end