Add host id to cinder default section
Cinder volumes are associated with the cinder host that created them. This unique host id can be changed in the conf file. This patch adds support to allow that. Change-Id: I9295ed1bfa24bfac8325bd347a92b5e334a31371 Closes-Bug: #1451967
This commit is contained in:
parent
cb7a11a2c4
commit
c9f1018d9b
|
@ -37,6 +37,10 @@ default['openstack']['block-storage']['custom_template_banner'] = '
|
||||||
default['openstack']['block-storage']['verbose'] = 'False'
|
default['openstack']['block-storage']['verbose'] = 'False'
|
||||||
default['openstack']['block-storage']['debug'] = 'False'
|
default['openstack']['block-storage']['debug'] = 'False'
|
||||||
|
|
||||||
|
# Name of this node. This can be an opaque identifier. It is
|
||||||
|
# not necessarily a hostname, FQDN, or IP address. (StrOpt)
|
||||||
|
default['openstack']['block-storage']['host'] = nil
|
||||||
|
|
||||||
# Specify policy.json remote file to import
|
# Specify policy.json remote file to import
|
||||||
default['openstack']['block-storage']['policyfile_url'] = nil
|
default['openstack']['block-storage']['policyfile_url'] = nil
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ describe 'openstack-block-storage::cinder-common' do
|
||||||
context 'template contents' do
|
context 'template contents' do
|
||||||
|
|
||||||
context 'commonly named attributes' do
|
context 'commonly named attributes' do
|
||||||
%w(debug verbose notification_driver
|
%w(debug verbose host notification_driver
|
||||||
storage_availability_zone quota_volumes quota_gigabytes quota_driver
|
storage_availability_zone quota_volumes quota_gigabytes quota_driver
|
||||||
volume_name_template snapshot_name_template osapi_volume_workers
|
volume_name_template snapshot_name_template osapi_volume_workers
|
||||||
use_default_quota_class quota_snapshots no_snapshot_gb_quota
|
use_default_quota_class quota_snapshots no_snapshot_gb_quota
|
||||||
|
@ -175,7 +175,7 @@ describe 'openstack-block-storage::cinder-common' do
|
||||||
it "has a #{attr_key} attribute" do
|
it "has a #{attr_key} attribute" do
|
||||||
node.set['openstack']['block-storage'][attr_key] = "#{attr_key}_value"
|
node.set['openstack']['block-storage'][attr_key] = "#{attr_key}_value"
|
||||||
|
|
||||||
expect(chef_run).to render_file(file.name).with_content(/^#{attr_key}=#{attr_key}_value$/)
|
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^#{attr_key}=#{attr_key}_value$/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -196,6 +196,10 @@ describe 'openstack-block-storage::cinder-common' do
|
||||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_concurrency', %r(^lock_path=/var/lib/cinder/lock$))
|
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_concurrency', %r(^lock_path=/var/lib/cinder/lock$))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not have unique host id by default' do
|
||||||
|
expect(chef_run).not_to render_config_file(file.name).with_section_content('DEFAULT', /^host=/)
|
||||||
|
end
|
||||||
|
|
||||||
context 'netapp driver' do
|
context 'netapp driver' do
|
||||||
# FIXME(galstrom21): this block needs to check all of the default
|
# FIXME(galstrom21): this block needs to check all of the default
|
||||||
# netapp_* configuration options
|
# netapp_* configuration options
|
||||||
|
|
|
@ -139,7 +139,9 @@ api_rate_limit=<%= node["openstack"]["block-storage"]["api"]["ratelimit"] %>
|
||||||
# scheduler_manager=cinder.scheduler.manager.SchedulerManager
|
# scheduler_manager=cinder.scheduler.manager.SchedulerManager
|
||||||
#### (StrOpt) full class name for the Manager for scheduler
|
#### (StrOpt) full class name for the Manager for scheduler
|
||||||
|
|
||||||
# host=cinder
|
<% if node['openstack']['block-storage']['host'] -%>
|
||||||
|
host=<%= node['openstack']['block-storage']['host'] %>
|
||||||
|
<% end -%>
|
||||||
#### (StrOpt) Name of this node. This can be an opaque identifier. It is
|
#### (StrOpt) Name of this node. This can be an opaque identifier. It is
|
||||||
#### not necessarily a hostname, FQDN, or IP address.
|
#### not necessarily a hostname, FQDN, or IP address.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue