Allow customization of DEFAULT/host

The 'host' setting is frequently changed in HA scenarios where
multiple instances of the cinder services are meant to behave
as a single one.

Change-Id: Iaf5315a0d6532f3166b9a07fc61f41c6b0b15cc2
This commit is contained in:
Giulio Fidente 2016-02-18 14:30:11 +01:00
parent 9cdc6f0eb9
commit d3a93d4405
2 changed files with 17 additions and 0 deletions

View File

@ -208,6 +208,11 @@
# 'cinder::backend::rdb::volume_tmp_dir' parameter.
# Defaults to $::os_service_default
#
# [*host*]
# (optional) Name of this node. This can be an opaque identifier. It is
# not necessarily a host name, FQDN, or IP address.
# Defaults to $::os_service_default
#
# === Deprecated Parameters
#
# [*qpid_hostname*]
@ -304,6 +309,7 @@ class cinder (
$enable_v2_api = true,
$lock_path = $::cinder::params::lock_path,
$image_conversion_dir = $::os_service_default,
$host = $::os_service_default,
# DEPRECATED PARAMETERS
$qpid_hostname = undef,
$qpid_port = undef,
@ -409,6 +415,7 @@ class cinder (
'DEFAULT/storage_availability_zone': value => $storage_availability_zone;
'DEFAULT/default_availability_zone': value => $default_availability_zone_real;
'DEFAULT/image_conversion_dir': value => $image_conversion_dir;
'DEFAULT/host': value => $host;
}
# SSL Options

View File

@ -254,4 +254,14 @@ describe 'cinder' do
it { is_expected.to contain_cinder_config('DEFAULT/image_conversion_dir').with_value('/tmp/foo') }
end
describe 'with host' do
let :params do
req_params.merge({
:host => 'mystring',
})
end
it { is_expected.to contain_cinder_config('DEFAULT/host').with_value('mystring') }
end
end