Merge "Add support for 'image_conversion_dir' parameter"
This commit is contained in:
commit
79023068a6
@ -33,11 +33,6 @@
|
||||
# (optional) A required parameter to use cephx.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*volume_tmp_dir*]
|
||||
# (optional) Location to store temporary image files if the volume
|
||||
# driver does not write them directly to the volume
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rbd_max_clone_depth*]
|
||||
# (optional) Maximum number of nested clones that can be taken of a
|
||||
# volume before enforcing a flatten prior to next clone.
|
||||
@ -68,6 +63,13 @@
|
||||
# Example :
|
||||
# { 'rbd_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# === Deprecated Parameters
|
||||
#
|
||||
# [*volume_tmp_dir*]
|
||||
# (deprecated by image_conversion_dir) Location to store temporary image files
|
||||
# if the volume driver does not write them directly to the volumea.
|
||||
# Defaults to false
|
||||
#
|
||||
define cinder::backend::rbd (
|
||||
$rbd_pool,
|
||||
$rbd_user,
|
||||
@ -76,13 +78,14 @@ define cinder::backend::rbd (
|
||||
$rbd_ceph_conf = '/etc/ceph/ceph.conf',
|
||||
$rbd_flatten_volume_from_snapshot = $::os_service_default,
|
||||
$rbd_secret_uuid = $::os_service_default,
|
||||
$volume_tmp_dir = $::os_service_default,
|
||||
$rbd_max_clone_depth = $::os_service_default,
|
||||
$rados_connect_timeout = $::os_service_default,
|
||||
$rados_connection_interval = $::os_service_default,
|
||||
$rados_connection_retries = $::os_service_default,
|
||||
$rbd_store_chunk_size = $::os_service_default,
|
||||
$extra_options = {},
|
||||
# DEPRECATED PARAMETERS
|
||||
$volume_tmp_dir = false,
|
||||
) {
|
||||
|
||||
include ::cinder::params
|
||||
@ -100,7 +103,6 @@ define cinder::backend::rbd (
|
||||
"${name}/rados_connection_interval": value => $rados_connection_interval;
|
||||
"${name}/rados_connection_retries": value => $rados_connection_retries;
|
||||
"${name}/rbd_store_chunk_size": value => $rbd_store_chunk_size;
|
||||
"${name}/volume_tmp_dir": value => $volume_tmp_dir;
|
||||
}
|
||||
|
||||
if $backend_host {
|
||||
@ -113,6 +115,11 @@ define cinder::backend::rbd (
|
||||
}
|
||||
}
|
||||
|
||||
if $volume_tmp_dir {
|
||||
cinder_config {"${name}/volume_tmp_dir": value => $volume_tmp_dir;}
|
||||
warning('The rbd volume_tmp_dir parameter is deprecated. Please use image_conversion_dir in the cinder base class instead.')
|
||||
}
|
||||
|
||||
create_resources('cinder_config', $extra_options)
|
||||
|
||||
case $::osfamily {
|
||||
|
@ -197,6 +197,13 @@
|
||||
# by the user executing the agent
|
||||
# Defaults to: $::cinder::params::lock_path
|
||||
#
|
||||
# [*image_conversion_dir*]
|
||||
# (optional) Location to store temporary image files if the volume
|
||||
# driver does not write them directly to the volume and the volume conversion
|
||||
# needs to be performed. This parameter replaces the
|
||||
# 'cinder::backend::rdb::volume_tmp_dir' parameter.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# === Deprecated Parameters
|
||||
#
|
||||
# [*qpid_hostname*]
|
||||
@ -291,6 +298,7 @@ class cinder (
|
||||
$enable_v1_api = true,
|
||||
$enable_v2_api = true,
|
||||
$lock_path = $::cinder::params::lock_path,
|
||||
$image_conversion_dir = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$qpid_hostname = undef,
|
||||
$qpid_port = undef,
|
||||
@ -386,6 +394,7 @@ class cinder (
|
||||
'DEFAULT/rpc_backend': value => $rpc_backend;
|
||||
'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;
|
||||
}
|
||||
|
||||
# SSL Options
|
||||
|
@ -22,11 +22,6 @@
|
||||
# (optional) A required parameter to use cephx.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*volume_tmp_dir*]
|
||||
# (optional) Location to store temporary image files if the volume
|
||||
# driver does not write them directly to the volume
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rbd_max_clone_depth*]
|
||||
# (optional) Maximum number of nested clones that can be taken of a
|
||||
# volume before enforcing a flatten prior to next clone.
|
||||
@ -57,19 +52,27 @@
|
||||
# Example :
|
||||
# { 'rbd_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# === Deprecated Parameters
|
||||
#
|
||||
# [*volume_tmp_dir*]
|
||||
# (deprecated by image_conversion_dir) Location to store temporary image files
|
||||
# if the volume driver does not write them directly to the volume
|
||||
# Defaults to false
|
||||
#
|
||||
class cinder::volume::rbd (
|
||||
$rbd_pool,
|
||||
$rbd_user,
|
||||
$rbd_ceph_conf = '/etc/ceph/ceph.conf',
|
||||
$rbd_flatten_volume_from_snapshot = $::os_service_default,
|
||||
$rbd_secret_uuid = $::os_service_default,
|
||||
$volume_tmp_dir = $::os_service_default,
|
||||
$rbd_max_clone_depth = $::os_service_default,
|
||||
$rados_connect_timeout = $::os_service_default,
|
||||
$rados_connection_interval = $::os_service_default,
|
||||
$rados_connection_retries = $::os_service_default,
|
||||
$rbd_store_chunk_size = $::os_service_default,
|
||||
$extra_options = {},
|
||||
# DEPRECATED PARAMETERS
|
||||
$volume_tmp_dir = false,
|
||||
) {
|
||||
|
||||
cinder::backend::rbd { 'DEFAULT':
|
||||
|
@ -234,4 +234,14 @@ describe 'cinder' do
|
||||
it { is_expected.to contain_cinder_config('DEFAULT/enable_v2_api').with_value(true) }
|
||||
|
||||
end
|
||||
|
||||
describe 'with image_conversion_dir' do
|
||||
let :params do
|
||||
req_params.merge({
|
||||
:image_conversion_dir => '/tmp/foo',
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_cinder_config('DEFAULT/image_conversion_dir').with_value('/tmp/foo') }
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user