diff --git a/recipes/cinder-common.rb b/recipes/cinder-common.rb index 905dda5..683bb03 100644 --- a/recipes/cinder-common.rb +++ b/recipes/cinder-common.rb @@ -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 diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 941ef57..e34259d 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -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 diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index 2445010..43c93c1 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -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