explicitly set volumes_dir in cinder.conf

Fixes: bug #1269475
Implements: blueprint centos-rhel-for-block

On rhel systems, /usr/share/cinder/cinder-dist.conf sets:

volumes_dir=/etc/cinder/volumes

In order set this back to the default cleanly, we need to explicitly set it in
cinder.conf which will take precedence over the setting in
cinder-dist.conf

Change-Id: Id71efd10b0cbd27b72dfe8ec72c51cde70593b3e
This commit is contained in:
Darren Birkett 2014-01-15 15:57:49 +00:00
parent 7f9f71b097
commit df36ef89be
4 changed files with 7 additions and 2 deletions

View File

@ -165,6 +165,7 @@ default['openstack']['block-storage']['cron']['minute'] = '00'
default['openstack']['block-storage']['cron']['audit_logfile'] = '/var/log/cinder/audit.log'
default['openstack']['block-storage']['volume']['state_path'] = '/var/lib/cinder'
default['openstack']['block-storage']['volume']['volumes_dir'] = '/var/lib/cinder/volumes'
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

View File

@ -58,6 +58,10 @@ describe "openstack-block-storage::cinder-common" do
expect(@chef_run).to render_file(@file.name).with_content("rpc_backend=cinder.openstack.common.rpc.impl_kombu")
end
it "has has volumes_dir set" do
expect(@chef_run).to render_file(@file.name).with_content("volumes_dir=/var/lib/cinder/volumes")
end
it "has correct volume.driver set" do
expect(@chef_run).to render_file(@file.name).with_content("volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver")
end

View File

@ -577,7 +577,7 @@ rbd_secret_uuid=<%= node["openstack"]["block-storage"]["rbd_secret_uuid"] %>
iscsi_helper=<%= node["openstack"]["block-storage"]["volume"]["iscsi_helper"] %>
#### (StrOpt) iscsi target user-land tool to use
# volumes_dir=$state_path/volumes
volumes_dir=<%= node['openstack']['block-storage']['volume']['volumes_dir'] %>
#### (StrOpt) Volume configuration file storage directory

View File

@ -1,7 +1,7 @@
<%= node["openstack"]["block-storage"]["custom_template_banner"] %>
<% if %w{redhat centos fedora suse}.include?(node["platform"]) %>
include /var/lib/cinder/volumes/*
include <%= node['openstack']['block-storage']['volume']['volumes_dir'] %>/*
<% end %>
<% if %w{debian ubuntu}.include?(node["platform"]) %>
include /etc/tgt/conf.d/*.conf