From c836a99b044489e0024389eb3ad302d094793136 Mon Sep 17 00:00:00 2001 From: TaoBai Date: Fri, 27 Mar 2015 02:15:24 -0700 Subject: [PATCH] Update cookbook for storwize new features There are new configuration items added to cinder.conf for new features "QoS" and "volume-replication" in Juno. Change-Id: I6f69dbe6cc1e0a1dbb5da1417d44211463a7df36 --- README.md | 2 ++ attributes/default.rb | 2 ++ spec/cinder_common_spec.rb | 7 +++++-- templates/default/cinder.conf.erb | 10 ++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f543be..30fac91 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,8 @@ Cinder attributes * `openstack['block-storage']['storwize']['storwize_svc_iscsi_chap_enabled'] - Configure CHAP authentication for iSCSI connections * `openstack['block-storage']['storwize']['storwize_svc_multipath_enabled'] - Connect with multipath (FC only; iSCSI multipath is controlled by Nova) * `openstack['block-storage']['storwize']['storwize_svc_multihostmap_enabled'] - Allows vdisk to multi host mapping +* `openstack['block-storage']['storwize']['storwize_svc_allow_tenant_qos'] - Allow tenants to specify QOS on create +* `openstack['block-storage']['storwize']['storwize_svc_stretched_cluster_partner'] - Enable volume-replication for stretched cluster ### FlashSystem attributes ### * `openstack['block-storage']['san']['san_ip'] - IP address of FlashSystem Cluster node diff --git a/attributes/default.rb b/attributes/default.rb index e59163b..42d91db 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -179,6 +179,8 @@ default['openstack']['block-storage']['storwize']['storwize_svc_connection_proto default['openstack']['block-storage']['storwize']['storwize_svc_iscsi_chap_enabled'] = true default['openstack']['block-storage']['storwize']['storwize_svc_multipath_enabled'] = false default['openstack']['block-storage']['storwize']['storwize_svc_multihostmap_enabled'] = true +default['openstack']['block-storage']['storwize']['storwize_svc_allow_tenant_qos'] = false +default['openstack']['block-storage']['storwize']['storwize_svc_stretched_cluster_partner'] = nil # SolidFire Support default['openstack']['block-storage']['solidfire']['san_ip'] = node['openstack']['block-storage']['san']['san_ip'] diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 2050858..f8217ac 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -596,7 +596,8 @@ describe 'openstack-block-storage::cinder-common' do storwize_svc_flashcopy_timeout=120 storwize_svc_connection_protocol=iSCSI storwize_svc_iscsi_chap_enabled=true - storwize_svc_multihostmap_enabled=true).each do |attr| + storwize_svc_multihostmap_enabled=true + storwize_svc_allow_tenant_qos=false).each do |attr| expect(chef_run).to render_file(file.name).with_content(/^#{attr}$/) end end @@ -614,7 +615,9 @@ describe 'openstack-block-storage::cinder-common' do storwize_svc_vol_iogrp storwize_svc_flashcopy_timeout storwize_svc_connection_protocol - storwize_svc_multihostmap_enabled).each do |attr| + storwize_svc_multihostmap_enabled + storwize_svc_allow_tenant_qos + storwize_svc_stretched_cluster_partner).each do |attr| node.set['openstack']['block-storage']['storwize'][attr] = "storwize_#{attr}_value" expect(chef_run).to render_file(file.name).with_content(/^#{attr}=storwize_#{attr}_value$/) end diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index a680c0d..085acae 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -875,6 +875,16 @@ storwize_svc_multipath_enabled=<%= node["openstack"]["block-storage"]["storwize" # Allows vdisk to multi host mapping (boolean value) storwize_svc_multihostmap_enabled=<%= node["openstack"]["block-storage"]["storwize"]["storwize_svc_multihostmap_enabled"] %> +# Allow tenants to specify QOS on create (boolean value) +storwize_svc_allow_tenant_qos=<%= node["openstack"]["block-storage"]["storwize"]["storwize_svc_allow_tenant_qos"] %> + +<% unless node["openstack"]["block-storage"]["storwize"]["storwize_svc_stretched_cluster_partner"].nil? %> +# If operating in stretched cluster mode, specify the name of +# # the pool in which mirrored copies are stored. +# (Default: Null) (string value) +storwize_svc_stretched_cluster_partner=<%= node["openstack"]["block-storage"]["storwize"]["storwize_svc_stretched_cluster_partner"] %> + +<% end %> <% end %> <% if @enabled_drivers.include?("cinder.volume.drivers.emc.emc_smis_iscsi.EMCSMISISCSIDriver") %>