Add default_volume_type to cinder config
This allows the administrator of a cloud with multiple backends to define which volume is the default when a user creats a volume without specifying a volume type. Change-Id: I1bb94dc1283e50645e4aece600acc52ae17db56b Co-Authored-By: Craige McWhirter <craige.mcwhirter@anchor.com.au> Closes-Bug: #1389292
This commit is contained in:
parent
4381295e1d
commit
5b2b60b319
|
@ -11,6 +11,7 @@ This file is used to list changes made in each version of the openstack-block-st
|
|||
* Add glance_api_insecure and make glance_api_servers to be prefixed with scheme
|
||||
* Add sysfsutils package for storwize/SVC driver
|
||||
* Add glance_ca_certificates_file
|
||||
* Add default_volume_type config option
|
||||
|
||||
## 10.0.0
|
||||
* Upgrading to Juno
|
||||
|
|
|
@ -193,6 +193,7 @@ Cinder attributes
|
|||
|
||||
### Multiple backends attributes ###
|
||||
* `openstack['block-storage']['volume']['multi_backend']` - Hash map to indicate multiple backends sections, e.g. { 'lvm1' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver', 'volume_backend_name' => 'lvm1' }, 'lvm2' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver', 'volume_backend_name' => 'lvm2' } }
|
||||
* `default['openstack']['block-storage']['volume']['default_volume_type']` - String to indicate the volume_type that maps to one of the configured volume backends
|
||||
|
||||
The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance:
|
||||
|
||||
|
|
|
@ -284,6 +284,11 @@ default['openstack']['block-storage']['rbd_key_name'] = 'openstack_image_cephx_k
|
|||
# }
|
||||
default['openstack']['block-storage']['volume']['multi_backend'] = nil
|
||||
|
||||
# Default volume-type for volumes to be created as when client does not request
|
||||
# a specific type. Volume types are configured from cinder-client and
|
||||
# will reference the backend name.
|
||||
default['openstack']['block-storage']['volume']['default_volume_type'] = nil
|
||||
|
||||
# Misc option support
|
||||
# Allow additional strings to be added to cinder.conf
|
||||
# For example: ['# Comment', 'key=value']
|
||||
|
|
|
@ -782,6 +782,7 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
}
|
||||
}
|
||||
node.set['openstack']['block-storage']['volume']['volume_group'] = 'multi-lvm-group'
|
||||
node.set['openstack']['block-storage']['volume']['default_volume_type'] = 'some-type-name'
|
||||
node.set['openstack']['block-storage']['rbd_pool'] = 'multi-rbd-pool'
|
||||
node.set['openstack']['block-storage']['netapp']['dfm_login'] = 'multi-netapp-login'
|
||||
node.set['openstack']['block-storage']['netapp']['netapp_server_hostname'] = ['netapp-host-1', 'netapp-host-2']
|
||||
|
@ -834,6 +835,10 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
expect(chef_run).to render_file(file.name).with_content(/^volume_group=multi-lvm-group$/)
|
||||
end
|
||||
|
||||
it 'set default_volume_type option' do
|
||||
expect(chef_run).to render_file(file.name).with_content(/^default_volume_type=some-type-name$/)
|
||||
end
|
||||
|
||||
it 'set rbd option' do
|
||||
expect(chef_run).to render_file(file.name).with_content(/^rbd_pool=multi-rbd-pool$/)
|
||||
end
|
||||
|
@ -869,11 +874,16 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
it 'set gpfs option' do
|
||||
expect(chef_run).to render_file(file.name).with_content(/^gpfs_mount_point_base = multi-gpfs-mnt$/)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
it 'no multiple backends configured' do
|
||||
expect(chef_run).to_not render_file(file.name).with_content(/^enabled_backends = [\w\W]+$/)
|
||||
end
|
||||
|
||||
it 'does not set default_volume_type' do
|
||||
expect(chef_run).to_not render_file(file.name).with_content(/^default_volume_type=.+$/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -614,6 +614,8 @@ volume_driver=<%= node["openstack"]["block-storage"]["volume"]["driver"] %>
|
|||
# volume_force_update_capabilities=false
|
||||
#### (BoolOpt) if True will force update capabilities on each check
|
||||
|
||||
# Default volume type to use (string value)
|
||||
default_volume_type=<%= node["openstack"]["block-storage"]["volume"]["default_volume_type"] %>
|
||||
|
||||
######## defined in cinder.volume.netapp ########
|
||||
|
||||
|
|
Loading…
Reference in New Issue