From b12c8035d7a349cc0df65571550560d64f8120a3 Mon Sep 17 00:00:00 2001 From: Pranali Deore Date: Thu, 11 Apr 2019 14:11:58 +0530 Subject: [PATCH] Add more settings for glance image cache Adding some THT parameters for controlling below cache settings, - image_cache_dir - image_cache_max_size - image_cache_stall_time blueprint: split-controlplane-glance-cache Change-Id: Id30392df14a79d02cc9236fe7843fc9bff14ba9d (cherry picked from commit 1f2a71e41b708fa71fbee2d64abbeae1596eb52c) --- .../glance/glance-api-container-puppet.yaml | 23 +++++++++++++++++++ ...image_cache_settings-50af5ff56a7d7f75.yaml | 10 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 releasenotes/notes/add_image_cache_settings-50af5ff56a7d7f75.yaml diff --git a/deployment/glance/glance-api-container-puppet.yaml b/deployment/glance/glance-api-container-puppet.yaml index 1420630974..eeb79c66ad 100644 --- a/deployment/glance/glance-api-container-puppet.yaml +++ b/deployment/glance/glance-api-container-puppet.yaml @@ -79,6 +79,22 @@ parameters: description: Enable Glance Image Cache type: boolean default: False + GlanceImageCacheDir: + description: Base directory that the Image Cache uses + type: string + default: '/var/lib/glance/image-cache' + GlanceImageCacheMaxSize: + description: > + The upper limit on cache size, in bytes, after which the cache-pruner + cleans up the image cache. + type: number + default: 10737418240 + GlanceImageCacheStallTime: + description: > + The amount of time, in seconds, to let an image remain in the cache + without being accessed. + type: number + default: 86400 GlanceNfsShare: default: '' description: > @@ -398,6 +414,13 @@ outputs: glance::backend::cinder::cinder_store_user_name: 'glance' glance::backend::cinder::cinder_store_password: {get_param: GlancePassword} - {} + - + if: + - glance_cache_enabled + - glance::api::image_cache_dir: {get_param: GlanceImageCacheDir} + glance::api::image_cache_max_size: {get_param: GlanceImageCacheMaxSize} + glance::api::image_cache_stall_time: {get_param: GlanceImageCacheStallTime} + - {} - if: - glance_netapp_nfs_enabled diff --git a/releasenotes/notes/add_image_cache_settings-50af5ff56a7d7f75.yaml b/releasenotes/notes/add_image_cache_settings-50af5ff56a7d7f75.yaml new file mode 100644 index 0000000000..b90f43c992 --- /dev/null +++ b/releasenotes/notes/add_image_cache_settings-50af5ff56a7d7f75.yaml @@ -0,0 +1,10 @@ +--- +features: + - Add GlanceImageCacheDir parameter to set base directory location + that the Image Cache uses. + + Add GlanceImageCacheMaxSize parameter to set the upper limit on cache + size, in bytes, after which the cache-pruner cleans up the image cache. + + Add GlanceImageCacheStallTime parameter to set the amount of time to let + an image remain in the cache without being accessed.