Add cache prefetcher interval configuration option
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. Enabled 'cache_prefetcher_interval' configuration option in glance-api.conf. Change-Id: I8ece28a9b0c6f104130d817490e9ea4c2b4e7808
This commit is contained in:
parent
8e4c57b6a3
commit
24ee288b85
|
@ -75,6 +75,10 @@
|
|||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*cache_prefetcher_interval*]
|
||||
# (optional) The interval in seconds to run periodic job 'cache_images'
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*image_cache_max_size*]
|
||||
# (optional) The upper limit (the maximum size of accumulated cache in bytes) beyond which pruner,
|
||||
# if running, starts cleaning the images cache.
|
||||
|
@ -347,6 +351,7 @@ class glance::api(
|
|||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
$database_max_overflow = undef,
|
||||
$cache_prefetcher_interval = $::os_service_default,
|
||||
$image_cache_max_size = $::os_service_default,
|
||||
$image_cache_stall_time = $::os_service_default,
|
||||
$image_cache_dir = '/var/lib/glance/image-cache',
|
||||
|
@ -427,6 +432,7 @@ cinder::backend::multistore::cinder::cinder_os_region_name instead.')
|
|||
'DEFAULT/location_strategy': value => $location_strategy;
|
||||
'DEFAULT/scrub_time': value => $scrub_time;
|
||||
'DEFAULT/delayed_delete': value => $delayed_delete;
|
||||
'DEFAULT/cache_prefetcher_interval': value => $cache_prefetcher_interval;
|
||||
'DEFAULT/image_cache_dir': value => $image_cache_dir;
|
||||
'DEFAULT/image_cache_stall_time': value => $image_cache_stall_time;
|
||||
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Added cache_prefetcher_interval in glance-api.conf,
|
||||
using which the periodic job will run as per the set
|
||||
interval and prefetch images into cache.
|
|
@ -33,6 +33,7 @@ describe 'glance::api' do
|
|||
:image_member_quota => '<SERVICE DEFAULT>',
|
||||
:image_cache_stall_time => '<SERVICE DEFAULT>',
|
||||
:image_cache_max_size => '<SERVICE DEFAULT>',
|
||||
:cache_prefetcher_interval => '<SERVICE DEFAULT>',
|
||||
:pipeline => 'keystone',
|
||||
:task_time_to_live => '<SERVICE DEFAULT>',
|
||||
:task_executor => '<SERVICE DEFAULT>',
|
||||
|
@ -77,6 +78,7 @@ describe 'glance::api' do
|
|||
:image_member_quota => '128',
|
||||
:image_cache_stall_time => '10',
|
||||
:image_cache_max_size => '10737418240',
|
||||
:cache_prefetcher_interval => '300',
|
||||
:pipeline => 'keystone2',
|
||||
:sync_db => false,
|
||||
:limit_param_default => '10',
|
||||
|
@ -131,6 +133,7 @@ describe 'glance::api' do
|
|||
'image_cache_dir',
|
||||
'image_cache_stall_time',
|
||||
'image_cache_max_size',
|
||||
'cache_prefetcher_interval',
|
||||
'node_staging_uri',
|
||||
'image_member_quota',
|
||||
'enable_v1_api',
|
||||
|
|
Loading…
Reference in New Issue