1 # == define: cinder::backend::netapp
3 # Configures Cinder to use the NetApp unified volume driver
4 # Compatible for multiple backends
9 # (required) Administrative user account name used to access the storage
10 # system or proxy server.
13 # (required) Password for the administrative user account specified in the
14 # netapp_login parameter.
16 # [*netapp_server_hostname*]
17 # (required) The hostname (or IP address) for the storage system or proxy
20 # [*netapp_server_port*]
21 # (optional) The TCP port to use for communication with ONTAPI on the
22 # storage system. Traditionally, port 80 is used for HTTP and port 443 is
23 # used for HTTPS; however, this value should be changed if an alternate
24 # port has been configured on the storage system or proxy server.
27 # [*netapp_size_multiplier*]
28 # (optional) The quantity to be multiplied by the requested volume size to
29 # ensure enough space is available on the virtual storage server (Vserver) to
30 # fulfill the volume creation request.
33 # [*netapp_storage_family*]
34 # (optional) The storage family type used on the storage system; valid values
35 # are ontap_7mode for using Data ONTAP operating in 7-Mode or ontap_cluster
36 # for using clustered Data ONTAP, or eseries for NetApp E-Series.
37 # Defaults to ontap_cluster
39 # [*netapp_storage_protocol*]
40 # (optional) The storage protocol to be used on the data path with the storage
41 # system; valid values are iscsi or nfs.
44 # [*netapp_transport_type*]
45 # (optional) The transport protocol used when communicating with ONTAPI on the
46 # storage system or proxy server. Valid values are http or https.
50 # (optional) The vFiler unit on which provisioning of block storage volumes
51 # will be done. This parameter is only used by the driver when connecting to
52 # an instance with a storage family of Data ONTAP operating in 7-Mode and the
53 # storage protocol selected is iSCSI. Only use this parameter when utilizing
54 # the MultiStore feature on the NetApp storage system.
57 # [*netapp_volume_list*]
58 # (optional) This parameter is only utilized when the storage protocol is
59 # configured to use iSCSI. This parameter is used to restrict provisioning to
60 # the specified controller volumes. Specify the value of this parameter to be
61 # a comma separated list of NetApp controller volume names to be used for
66 # (optional) This parameter specifies the virtual storage server (Vserver)
67 # name on the storage cluster on which provisioning of block storage volumes
68 # should occur. If using the NFS storage protocol, this parameter is mandatory
69 # for storage service catalog support (utilized by Cinder volume type
70 # extra_specs support). If this parameter is specified, the exports belonging
71 # to the Vserver will only be used for provisioning in the future. Block
72 # storage volumes on exports not belonging to the Vserver specified by
73 # this parameter will continue to function normally.
76 # [*expiry_thres_minutes*]
77 # (optional) This parameter specifies the threshold for last access time for
78 # images in the NFS image cache. When a cache cleaning cycle begins, images
79 # in the cache that have not been accessed in the last M minutes, where M is
80 # the value of this parameter, will be deleted from the cache to create free
81 # space on the NFS share.
84 # [*thres_avl_size_perc_start*]
85 # (optional) If the percentage of available space for an NFS share has
86 # dropped below the value specified by this parameter, the NFS image cache
90 # [*thres_avl_size_perc_stop*]
91 # (optional) When the percentage of available space on an NFS share has
92 # reached the percentage specified by this parameter, the driver will stop
93 # clearing files from the NFS image cache that have not been accessed in the
94 # last M minutes, where M is the value of the expiry_thres_minutes parameter.
98 # (optional) Array of NFS exports in the form of host:/share; will be written into
99 # file specified in nfs_shares_config
102 # [*nfs_shares_config*]
103 # (optional) File with the list of available NFS shares
104 # Defaults to '/etc/cinder/shares.conf'
106 # [*nfs_mount_options*]
107 # (optional) Mount options passed to the nfs client. See section
108 # of the nfs man page for details.
111 # [*netapp_copyoffload_tool_path*]
112 # (optional) This option specifies the path of the NetApp Copy Offload tool
113 # binary. Ensure that the binary has execute permissions set which allow the
114 # effective user of the cinder-volume process to execute the file.
117 # [*netapp_controller_ips*]
118 # (optional) This option is only utilized when the storage family is
119 # configured to eseries. This option is used to restrict provisioning to the
120 # specified controllers. Specify the value of this option to be a comma
121 # separated list of controller hostnames or IP addresses to be used for
125 # [*netapp_sa_password*]
126 # (optional) Password for the NetApp E-Series storage array.
129 # [*netapp_storage_pools*]
130 # (optional) This option is used to restrict provisioning to the specified
131 # storage pools. Only dynamic disk pools are currently supported. Specify the
132 # value of this option to be a comma separated list of disk pool names to be
133 # used for provisioning.
136 # [*netapp_webservice_path*]
137 # (optional) This option is used to specify the path to the E-Series proxy
138 # application on a proxy server. The value is combined with the value of the
139 # netapp_transport_type, netapp_server_hostname, and netapp_server_port
140 # options to create the URL used by the driver to connect to the proxy
142 # Defaults to '/devmgr/v2'
146 # cinder::backend::netapp { 'myBackend':
147 # netapp_login => 'clusterAdmin',
148 # netapp_password => 'password',
149 # netapp_server_hostname => 'netapp.mycorp.com',
150 # netapp_server_port => '443',
151 # netapp_transport_type => 'https',
152 # netapp_vserver => 'openstack-vserver',
157 # Bob Callaway <bob.callaway@netapp.com>
161 # Copyright 2014 NetApp, Inc.
163 define cinder::backend::netapp (
166 $netapp_server_hostname,
167 $volume_backend_name = $name,
168 $netapp_server_port = '80',
169 $netapp_size_multiplier = '1.2',
170 $netapp_storage_family = 'ontap_cluster',
171 $netapp_storage_protocol = 'nfs',
172 $netapp_transport_type = 'http',
174 $netapp_volume_list = '',
175 $netapp_vserver = '',
176 $expiry_thres_minutes = '720',
177 $thres_avl_size_perc_start = '20',
178 $thres_avl_size_perc_stop = '60',
180 $nfs_shares_config = '/etc/cinder/shares.conf',
181 $netapp_copyoffload_tool_path = '',
182 $netapp_controller_ips = '',
183 $netapp_sa_password = '',
184 $netapp_storage_pools = '',
185 $nfs_mount_options = undef,
186 $netapp_webservice_path = '/devmgr/v2',
190 validate_array($nfs_shares)
191 file {$nfs_shares_config:
192 content => join($nfs_shares, "\n"),
193 require => Package['cinder'],
194 notify => Service['cinder-volume']
198 if $nfs_mount_options {
200 "${volume_backend_name}/nfs_mount_options": value => $nfs_mount_options;
204 "${volume_backend_name}/nfs_mount_options": ensure => absent;
209 "${volume_backend_name}/volume_backend_name": value => $volume_backend_name;
210 "${volume_backend_name}/volume_driver": value => 'cinder.volume.drivers.netapp.common.NetAppDriver';
211 "${volume_backend_name}/netapp_login": value => $netapp_login;
212 "${volume_backend_name}/netapp_password": value => $netapp_password, secret => true;
213 "${volume_backend_name}/netapp_server_hostname": value => $netapp_server_hostname;
214 "${volume_backend_name}/netapp_server_port": value => $netapp_server_port;
215 "${volume_backend_name}/netapp_size_multiplier": value => $netapp_size_multiplier;
216 "${volume_backend_name}/netapp_storage_family": value => $netapp_storage_family;
217 "${volume_backend_name}/netapp_storage_protocol": value => $netapp_storage_protocol;
218 "${volume_backend_name}/netapp_transport_type": value => $netapp_transport_type;
219 "${volume_backend_name}/netapp_vfiler": value => $netapp_vfiler;
220 "${volume_backend_name}/netapp_volume_list": value => $netapp_volume_list;
221 "${volume_backend_name}/netapp_vserver": value => $netapp_vserver;
222 "${volume_backend_name}/expiry_thres_minutes": value => $expiry_thres_minutes;
223 "${volume_backend_name}/thres_avl_size_perc_start": value => $thres_avl_size_perc_start;
224 "${volume_backend_name}/thres_avl_size_perc_stop": value => $thres_avl_size_perc_stop;
225 "${volume_backend_name}/nfs_shares_config": value => $nfs_shares_config;
226 "${volume_backend_name}/netapp_copyoffload_tool_path": value => $netapp_copyoffload_tool_path;
227 "${volume_backend_name}/netapp_controller_ips": value => $netapp_controller_ips;
228 "${volume_backend_name}/netapp_sa_password": value => $netapp_sa_password, secret => true;
229 "${volume_backend_name}/netapp_storage_pools": value => $netapp_storage_pools;
230 "${volume_backend_name}/netapp_webservice_path": value => $netapp_webservice_path;
233 if $netapp_storage_family == 'eseries' {
235 "${volume_backend_name}/use_multipath_for_image_xfer": value => true;