Add config parameter for cinder mounting needs
This patch is introducing cinder_mount_point_base parameter into
glance::backend::multistore::cinder class, so that operators can
provide the cinder mount point for NFS volumes.
Change-Id: Ib724f6e895716847827be48ed08b01a7a312338f
(cherry picked from commit 46e9319d8e
)
This commit is contained in:
parent
fb6c573c2b
commit
11bd956b9b
|
@ -73,6 +73,11 @@
|
||||||
# (optional) Flag to identify multipath is supported or not in the deployment
|
# (optional) Flag to identify multipath is supported or not in the deployment
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*cinder_mount_point_base*]
|
||||||
|
# (Optional) When glance uses cinder as store and cinder backend is NFS, the mount point
|
||||||
|
# would be required to be set with this parameter.
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*store_description*]
|
# [*store_description*]
|
||||||
# (optional) Provides constructive information about the store backend to
|
# (optional) Provides constructive information about the store backend to
|
||||||
# end users.
|
# end users.
|
||||||
|
@ -91,6 +96,7 @@ define glance::backend::multistore::cinder(
|
||||||
$cinder_os_region_name = 'RegionOne',
|
$cinder_os_region_name = 'RegionOne',
|
||||||
$cinder_enforce_multipath = $::os_service_default,
|
$cinder_enforce_multipath = $::os_service_default,
|
||||||
$cinder_use_multipath = $::os_service_default,
|
$cinder_use_multipath = $::os_service_default,
|
||||||
|
$cinder_mount_point_base = $::os_service_default,
|
||||||
$store_description = $::os_service_default,
|
$store_description = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@ -112,6 +118,7 @@ define glance::backend::multistore::cinder(
|
||||||
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
|
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
|
||||||
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
|
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
|
||||||
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
|
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
|
||||||
|
"${name}/cinder_mount_point_base": value => $cinder_mount_point_base;
|
||||||
"${name}/store_description": value => $store_description;
|
"${name}/store_description": value => $store_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +134,7 @@ define glance::backend::multistore::cinder(
|
||||||
"${name}/cinder_store_password": value => $cinder_store_password, secret => true;
|
"${name}/cinder_store_password": value => $cinder_store_password, secret => true;
|
||||||
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
|
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
|
||||||
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
|
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
|
||||||
|
"${name}/cinder_mount_point_base": value => $cinder_mount_point_base;
|
||||||
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
|
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
A new parameter ``cinder_mount_point_base`` is introduced into
|
||||||
|
``glance::backend::multistore::cinder`` class, so that operators
|
||||||
|
can provide the cinder mount point for NFS volumes.
|
|
@ -43,6 +43,7 @@ describe 'glance::backend::multistore::cinder' do
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionOne')
|
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionOne')
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_glance_api_config('cinder/cinder_mount_point_base').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
it 'configures glance-cache.conf' do
|
it 'configures glance-cache.conf' do
|
||||||
is_expected.to_not contain_glance_cache_config('cinder/store_description')
|
is_expected.to_not contain_glance_cache_config('cinder/store_description')
|
||||||
|
@ -58,6 +59,7 @@ describe 'glance::backend::multistore::cinder' do
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionOne')
|
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionOne')
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_glance_cache_config('cinder/cinder_mount_point_base').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -77,6 +79,7 @@ describe 'glance::backend::multistore::cinder' do
|
||||||
:cinder_os_region_name => 'RegionTwo',
|
:cinder_os_region_name => 'RegionTwo',
|
||||||
:cinder_enforce_multipath => true,
|
:cinder_enforce_multipath => true,
|
||||||
:cinder_use_multipath => true,
|
:cinder_use_multipath => true,
|
||||||
|
:cinder_mount_point_base => '/var/lib/glance/mnt',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
it 'configures glance-api.conf' do
|
it 'configures glance-api.conf' do
|
||||||
|
@ -93,6 +96,7 @@ describe 'glance::backend::multistore::cinder' do
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionTwo')
|
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionTwo')
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value(true)
|
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value(true)
|
||||||
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value(true)
|
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value(true)
|
||||||
|
is_expected.to contain_glance_api_config('cinder/cinder_mount_point_base').with_value('/var/lib/glance/mnt')
|
||||||
end
|
end
|
||||||
it 'configures glance-cache.conf' do
|
it 'configures glance-cache.conf' do
|
||||||
is_expected.to_not contain_glance_cache_config('cinder/store_description')
|
is_expected.to_not contain_glance_cache_config('cinder/store_description')
|
||||||
|
@ -108,6 +112,7 @@ describe 'glance::backend::multistore::cinder' do
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionTwo')
|
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionTwo')
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value(true)
|
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value(true)
|
||||||
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value(true)
|
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value(true)
|
||||||
|
is_expected.to contain_glance_cache_config('cinder/cinder_mount_point_base').with_value('/var/lib/glance/mnt')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue