From b2d7cab5f12e6fde40d49c2d00cbae2bcf522dc8 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 24 May 2018 08:56:28 -0600 Subject: [PATCH] Update netapp cinder configuration The upstream puppet-cinder modules have been updated to remove deprecated paramters. We were still passing in deprecated options for the netapp volume. This change ports the backwards compatibility that was being done in puppet-cinder into puppet-tripleo. This should be dropped in a later cycle. Change-Id: I08f548c7784f4e00add26aafc26a9671f503bb97 Closes-Bug: #1773188 --- .../profile/base/cinder/volume/netapp.pp | 56 +++++++++++-------- ...pp-hieradata-changes-3004544d96796e76.yaml | 9 +++ 2 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 releasenotes/notes/cinder-netapp-hieradata-changes-3004544d96796e76.yaml diff --git a/manifests/profile/base/cinder/volume/netapp.pp b/manifests/profile/base/cinder/volume/netapp.pp index c58d93763..f56d18d0e 100644 --- a/manifests/profile/base/cinder/volume/netapp.pp +++ b/manifests/profile/base/cinder/volume/netapp.pp @@ -38,29 +38,41 @@ class tripleo::profile::base::cinder::volume::netapp ( $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',') } + # fallback logic for search patterns since upstream puppet-cinder removed + # these. See I286a593f0e68dc9e60852674d2fa14551acb1bbb from puppet-cinder + $list = join(any2array(delete(delete_undef_values([ + hiera('cinder::backend::netapp::netapp_storage_pools', undef), + hiera('cinder::backend::netapp::netapp_volume_list', undef), + ]), '')),'|') + if $list != '' { + $netapp_pool_name_search_pattern_fallback = "(${list})" + } else { + $netapp_pool_name_search_pattern_fallback = undef + } cinder::backend::netapp { $backend_name : - netapp_login => hiera('cinder::backend::netapp::netapp_login', undef), - netapp_password => hiera('cinder::backend::netapp::netapp_password', undef), - netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef), - netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef), - netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef), - netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef), - netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef), - netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef), - netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef), - netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef), - netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef), - netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef), - nfs_shares => $cinder_netapp_nfs_shares, - nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef), - netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef), - netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef), - netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef), - netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef), - netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef), - netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef), - nas_secure_file_operations => hiera('cinder::backend::netapp::nas_secure_file_operations', undef), - nas_secure_file_permissions => hiera('cinder::backend::netapp::nas_secure_file_permissions', undef), + netapp_login => hiera('cinder::backend::netapp::netapp_login', undef), + netapp_password => hiera('cinder::backend::netapp::netapp_password', undef), + netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef), + netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef), + netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef), + netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef), + netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef), + netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef), + netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef), + netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef), + netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef), + nfs_shares => $cinder_netapp_nfs_shares, + nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef), + netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef), + netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef), + netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef), + netapp_host_type => hiera('cinder::backend::netapp::netapp_host_type', + hiera('cinder::backend::netapp::netapp_eseries_host_type', undef)), + netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef), + nas_secure_file_operations => hiera('cinder::backend::netapp::nas_secure_file_operations', undef), + nas_secure_file_permissions => hiera('cinder::backend::netapp::nas_secure_file_permissions', undef), + netapp_pool_name_search_pattern => hiera('cinder::backend::netapp::netapp_pool_name_search_pattern', + $netapp_pool_name_search_pattern_fallback), } } diff --git a/releasenotes/notes/cinder-netapp-hieradata-changes-3004544d96796e76.yaml b/releasenotes/notes/cinder-netapp-hieradata-changes-3004544d96796e76.yaml new file mode 100644 index 000000000..ac13b5798 --- /dev/null +++ b/releasenotes/notes/cinder-netapp-hieradata-changes-3004544d96796e76.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The following hieradata updates for cinder netapp integration should be done. + cinder::backend::netapp::netapp_pool_name_search_pattern should be used as + cinder::backend::netapp::netapp_storage_pools and + cinder::backend::netapp::netapp_volume_list have been removed. + cinder::backend::netapp::netapp_host_type should be configured instead of + cinder::backend::netapp::netapp_eseries_host_type