Let "osapi_volume_listen" can be configurable
When setup cinder in multiple nodes, cinder-api and cinder-volume will not exist in same node, so we should avoid value of "osapi_volume_listen" to be "0.0.0.0" and should set it as the ip of volume api host. Change-Id: I6daa46d497297e8e4ab9faa2caa953d242cc424e Closes-bug: #1305157
This commit is contained in:
parent
c61e53aae8
commit
3a576acbc4
|
@ -50,6 +50,7 @@ if node['openstack']['block-storage']['volume']['driver'] == 'cinder.volume.driv
|
|||
end
|
||||
|
||||
glance_api_endpoint = endpoint 'image-api'
|
||||
cinder_api_endpoint = endpoint 'block-storage-api'
|
||||
|
||||
directory '/etc/cinder' do
|
||||
group node['openstack']['block-storage']['group']
|
||||
|
@ -70,7 +71,8 @@ template '/etc/cinder/cinder.conf' do
|
|||
rabbit_hosts: rabbit_hosts,
|
||||
glance_host: glance_api_endpoint.host,
|
||||
glance_port: glance_api_endpoint.port,
|
||||
solidfire_pass: solidfire_pass
|
||||
solidfire_pass: solidfire_pass,
|
||||
volume_api_address: cinder_api_endpoint.host
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -63,6 +63,11 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
expect(chef_run).to render_file(file.name).with_content('volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver')
|
||||
end
|
||||
|
||||
it 'has osapi_volume_listen set' do
|
||||
node.set['openstack']['endpoints']['block-storage-api']['host'] = '1.1.1.1'
|
||||
expect(chef_run).to render_file(file.name).with_content('osapi_volume_listen=1.1.1.1')
|
||||
end
|
||||
|
||||
it 'has rpc_thread_pool_size' do
|
||||
expect(chef_run).to render_file(file.name).with_content('rpc_thread_pool_size=64')
|
||||
end
|
||||
|
|
|
@ -215,7 +215,7 @@ quota_driver=<%= node["openstack"]["block-storage"]["quota_driver"] %>
|
|||
#### periodic task scheduler to reduce stampeding. (Disable by
|
||||
#### setting to 0)
|
||||
|
||||
# osapi_volume_listen=0.0.0.0
|
||||
osapi_volume_listen=<%= @volume_api_address %>
|
||||
#### (StrOpt) IP address for OpenStack Volume API to listen
|
||||
|
||||
# osapi_volume_listen_port=8776
|
||||
|
|
Loading…
Reference in New Issue