Merge "Add volume_clear & volume_clear_size options for LVM"
This commit is contained in:
commit
53e1bcdfb2
|
@ -90,6 +90,8 @@ Cinder attributes
|
|||
* `openstack["block-storage"]["platform"]` - hash of platform specific package/service names and options
|
||||
* `openstack["block-storage"]["volume"]["state_path"]` - Top-level directory for maintaining cinder's state
|
||||
* `openstack["block-storage"]["volume"]["driver"]` - Driver to use for volume creation
|
||||
* `openstack["block-storage"]["volume"]["volume_clear"]` - Defines the method for clearing volumes on a volume delete possible options: 'zero', 'none', 'shred' (https://review.openstack.org/#/c/12521/)
|
||||
* `openstack["block-storage"]["volume"]["volume_clear_size"]` - size in MB used to limit the cleared area on deleting a volume, to the first part of the volume only. (default 0 = all MB)
|
||||
* `openstack["block-storage"]["volume"]["volume_group"]` - Name for the VG that will contain exported volumes
|
||||
* `openstack["block-storage"]["voluem"]["volume_group_size"]` - The size (GB) of volume group (default is 40)
|
||||
* `openstack["block-storage"]["voluem"]["create_volume_group"]` - Create volume group or not when using the LVMISCSIDriver (default is false)
|
||||
|
|
|
@ -140,6 +140,9 @@ default['openstack']['block-storage']['volume']['volumes_dir'] = '/var/lib/cinde
|
|||
default['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
|
||||
default['openstack']['block-storage']['volume']['volume_group'] = 'cinder-volumes'
|
||||
default['openstack']['block-storage']['volume']['volume_group_size'] = 40
|
||||
default['openstack']['block-storage']['volume']['volume_clear_size'] = 0
|
||||
default['openstack']['block-storage']['volume']['volume_clear'] = 'zero'
|
||||
|
||||
default['openstack']['block-storage']['volume']['create_volume_group'] = false
|
||||
default['openstack']['block-storage']['volume']['iscsi_helper'] = 'tgtadm'
|
||||
default['openstack']['block-storage']['volume']['iscsi_ip_address'] = node['ipaddress']
|
||||
|
|
|
@ -225,6 +225,30 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
expect(@chef_run).to render_file(@file.name).with_content('notification_topics=qpid_topic')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'lvm settings' do
|
||||
before do
|
||||
@chef_run = ::ChefSpec::Runner.new(::UBUNTU_OPTS) do |n|
|
||||
n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
|
||||
n.set['openstack']['block-storage']['volume']['volume_group'] = 'test-group'
|
||||
n.set['openstack']['block-storage']['volume']['volume_clear_size'] = 100
|
||||
n.set['openstack']['block-storage']['volume']['volume_clear'] = 'none'
|
||||
end
|
||||
@chef_run.converge 'openstack-block-storage::cinder-common'
|
||||
end
|
||||
|
||||
it 'has volume_group' do
|
||||
expect(@chef_run).to render_file(@file.name).with_content('volume_group=test-group')
|
||||
end
|
||||
|
||||
it 'has volume_clear_size' do
|
||||
expect(@chef_run).to render_file(@file.name).with_content('volume_clear_size=100')
|
||||
end
|
||||
|
||||
it 'has volume_clear' do
|
||||
expect(@chef_run).to render_file(@file.name).with_content('volume_clear=none')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '/var/lock/cinder' do
|
||||
|
|
|
@ -533,10 +533,13 @@ max_gigabytes=<%= node["openstack"]["block-storage"]["max_gigabytes"] %>
|
|||
|
||||
|
||||
######## defined in cinder.volume.driver ########
|
||||
|
||||
<% if node["openstack"]["block-storage"]["volume"]["driver"] == "cinder.volume.drivers.lvm.LVMISCSIDriver" %>
|
||||
volume_group=<%= node["openstack"]["block-storage"]["volume"]["volume_group"] %>
|
||||
#### (StrOpt) Name for the VG that will contain exported volumes
|
||||
volume_clear=<%= node["openstack"]["block-storage"]["volume"]["volume_clear"] %>
|
||||
volume_clear_size=<%= node["openstack"]["block-storage"]["volume"]["volume_clear_size"] %>
|
||||
|
||||
<% end %>
|
||||
# num_shell_tries=3
|
||||
#### (IntOpt) number of times to attempt to run flakey shell commands
|
||||
|
||||
|
|
Loading…
Reference in New Issue