puppet-glance/manifests/backend/file.pp
PranaliD da9e1a7f4e Add sparse image upload configuration parameters
Addng configuration option ``rbd_thin_provisioning`` and
``filesystem_thin_provisioning`` to rbd and filesystem
backends, to enable or not sparse upload.

A sparse file means that we do not actually write null byte
sequences but only the data itself at a given offset, the
"holes" which can appear will automatically be interpreted by
the storage backend as null bytes, and do not really consume
your storage.

Partially Implements: blueprint handle-sparse-image

Change-Id: Ic95fa45af0f1db92d8425862c6267f466764fbbe
2020-09-25 23:33:48 +00:00

40 lines
1.2 KiB
Puppet

# === class: glance::backend::file
#
# used to configure file backends for glance
#
# === parameters:
#
# [*filesystem_store_datadir*]
# Location where dist images are stored when
# default_store == file.
# Optional. Default: /var/lib/glance/images/
#
# [*filesystem_thin_provisioning*]
# (optional) Boolean describing if thin provisioning is enabled or not
# Defaults to $::os_service_default
#
# [*multi_store*]
# (optional) Boolean describing if multiple backends will be configured
# Defaults to false
#
class glance::backend::file(
$filesystem_store_datadir = '/var/lib/glance/images/',
$filesystem_thin_provisioning = $::os_service_default,
$multi_store = false,
) {
include glance::deps
warning('glance::backend::file is deprecated. Use glance::backend::multistore::file instead.')
glance::backend::multistore::file { 'glance_store':
filesystem_store_datadir => $filesystem_store_datadir,
filesystem_thin_provisioning => $filesystem_thin_provisioning,
store_description => undef,
}
if !$multi_store {
glance_api_config { 'glance_store/default_store': value => 'file'; }
}
}