From 11125acedc6c255421d5b38732f0ca92056c38c1 Mon Sep 17 00:00:00 2001 From: Pranali Deore Date: Thu, 21 May 2020 10:56:58 +0530 Subject: [PATCH] Enable glance cache prefetcher interval As new periodic job added in glance which will run as per interval set using 'cache_prefetcher_interval' configuration option and fetch images which are queued for caching in cache directory. Added GlanceImagePrefetcherInterval to configure 'cache_prefetcher_interval' configuration option in glance-api.conf when glance cache is enabled. Depends-on: I8ece28a9b0c6f104130d817490e9ea4c2b4e7808 Change-Id: I5294f7b9984ef0b59f505819e2ce95c41e69d3c8 (cherry picked from commit 13b06b52488e94ee3845c59c012144117dcf8140) (cherry picked from commit 97464f1647d3aae3390c8d0d3d410b0d29eb6211) --- deployment/glance/glance-api-container-puppet.yaml | 6 ++++++ .../add_glance_image_cache_prefetcher-288120ffa6ee2a13.yaml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/add_glance_image_cache_prefetcher-288120ffa6ee2a13.yaml diff --git a/deployment/glance/glance-api-container-puppet.yaml b/deployment/glance/glance-api-container-puppet.yaml index b67dd2893b..ac17cca23c 100644 --- a/deployment/glance/glance-api-container-puppet.yaml +++ b/deployment/glance/glance-api-container-puppet.yaml @@ -100,6 +100,11 @@ parameters: without being accessed. type: number default: 86400 + GlanceImagePrefetcherInterval: + description: > + The interval in seconds to run periodic job cache_images. + type: number + default: 300 GlanceNfsShare: default: '' description: > @@ -491,6 +496,7 @@ outputs: - 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} + glance::api::cache_prefetcher_interval: {get_param: GlanceImagePrefetcherInterval} - {} - if: diff --git a/releasenotes/notes/add_glance_image_cache_prefetcher-288120ffa6ee2a13.yaml b/releasenotes/notes/add_glance_image_cache_prefetcher-288120ffa6ee2a13.yaml new file mode 100644 index 0000000000..4501ba73b4 --- /dev/null +++ b/releasenotes/notes/add_glance_image_cache_prefetcher-288120ffa6ee2a13.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add GlanceImagePrefetcherInterval parameter to run periodic job + which fetches the queued images for caching in cache directory, + when image cache is enabled.