Allow binding locally to different IP than endpoint IP
Sometimes you want the actual endpoint IP to be a load balanced IP, but the bind IP to be a local IP (different per node). This change allows that by using attributes from the [block-storage-api-bind] namespace Implements blueprint increase-ip-binding-flexibility Change-Id: I79ca114d2d78caaf101357e1400aa046c9943956
This commit is contained in:
parent
43a4e47717
commit
d9eb8eff9f
|
@ -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
|
||||
=====
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue