diff --git a/README.md b/README.md index 7ba40ec..f3bc7ad 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,14 @@ Cinder attributes * `openstack['block-storage']['ibmnas']['mount_point_base']` - Storage system autoexpand parameter for volumes * `openstack['block-storage']['ibmnas']['nfs_sparsed_volumes']` - Storage system volume creation method +The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance: + +* `openstack['endpoints']['block-storage-api-bind']['host']` - The IP address to bind the api service to +* `openstack['endpoints']['block-storage-api-bind']['port']` - The port to bind the api service to +* `openstack['endpoints']['block-storage-api-bind']['bind_interface']` - The interface name to bind the api service to + +If the value of the 'bind_interface' attribute is non-nil, then the block-storage service will be bound to the first IP address on that interface. If the value of the 'bind_interface' attribute is nil, then the block-storage service will be bound to the IP address specified in the host attribute. + Testing ===== diff --git a/recipes/cinder-common.rb b/recipes/cinder-common.rb index f7b5fd3..0e9cf15 100644 --- a/recipes/cinder-common.rb +++ b/recipes/cinder-common.rb @@ -52,7 +52,7 @@ elsif node['openstack']['block-storage']['volume']['driver'] == 'cinder.volume.d end glance_api_endpoint = endpoint 'image-api' -cinder_api_endpoint = endpoint 'block-storage-api' +cinder_api_bind = endpoint 'block-storage-api-bind' directory '/etc/cinder' do group node['openstack']['block-storage']['group'] @@ -75,8 +75,8 @@ template '/etc/cinder/cinder.conf' do glance_port: glance_api_endpoint.port, ibmnas_pass: ibmnas_pass, solidfire_pass: solidfire_pass, - volume_api_bind_address: cinder_api_endpoint.host, - volume_api_bind_port: cinder_api_endpoint.port + volume_api_bind_address: cinder_api_bind.host, + volume_api_bind_port: cinder_api_bind.port ) end diff --git a/spec/api_spec.rb b/spec/api_spec.rb index 191c65f..2a43726 100644 --- a/spec/api_spec.rb +++ b/spec/api_spec.rb @@ -128,7 +128,7 @@ describe 'openstack-block-storage::api' do .with('identity-api') .and_return(endpoint) Chef::Recipe.any_instance.stub(:endpoint) - .with('block-storage-api') + .with('block-storage-api-bind') .and_return(endpoint) Chef::Recipe.any_instance.stub(:auth_uri_transform) .and_return('auth_uri_transform') diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 99429f1..9e9927c 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -53,7 +53,7 @@ describe 'openstack-block-storage::cinder-common' do .with('image-api') .and_return(double(host: 'glance_host_value', port: 'glance_port_value')) Chef::Recipe.any_instance.stub(:endpoint) - .with('block-storage-api') + .with('block-storage-api-bind') .and_return(double(host: 'cinder_host_value', port: 'cinder_port_value')) Chef::Recipe.any_instance.stub(:get_password) .with('user', anything)