Takashi Kajinami faf117f9f8 Support image volume cache options
This introduces support for the options to customize the image volume
cache feature. This feature is added to the default class as well as
the defined resource type for each volume driver, so that users can
configure the global options as well as the backend specific options.

Note that rbd driver and vmware driver are intentionally excluded,
because for these drivers the specific image store drivers are more
popular method to use in-storage copy when creating a volume from
an image.

Change-Id: I09480346f3a2f05b5ab0aad7033f1b37a31648db
2023-12-26 18:17:30 +09:00

40 lines
1.4 KiB
Puppet

# == Class: cinder::backend::defaults
#
# Cinder backend defaults
#
# === Parameters
#
# [*use_multipath_for_image_xfer*]
# (Optional) Whether to use multipath during create-volume-from-image and
# copy-volume-to-image operations.
# Defaults to $facts['os_service_default']
#
# [*image_volume_cache_enabled*]
# (Optional) Enable Cinder's image cache function.
# Defaults to $facts['os_service_default'],
#
# [*image_volume_cache_max_size_gb*]
# (Optional) Max size of the image volume cache in GB.
# Defaults to $facts['os_service_default'],
#
# [*image_volume_cache_max_count*]
# (Optional) Max number of entries allowed in the image volume cache.
# Defaults to $facts['os_service_default'],
#
class cinder::backend::defaults (
$use_multipath_for_image_xfer = $facts['os_service_default'],
$image_volume_cache_enabled = $facts['os_service_default'],
$image_volume_cache_max_size_gb = $facts['os_service_default'],
$image_volume_cache_max_count = $facts['os_service_default'],
) {
include cinder::deps
cinder_config {
'backend_defaults/use_multipath_for_image_xfer': value => $use_multipath_for_image_xfer;
'backend_defaults/image_volume_cache_enabled': value => $image_volume_cache_enabled;
'backend_defaults/image_volume_cache_max_size_gb': value => $image_volume_cache_max_size_gb;
'backend_defaults/image_volume_cache_max_count': value => $image_volume_cache_max_count;
}
}