Add glance cache variables into glance-api

In glance caching doc is stated[1], that some of the variables
should be defined in both glance-api and glance-cache config and should
be exactly the same, otherwise issues might raise.

We also introduce glance_image_cache_stall_time variable to control
cache time reliable across config files

[1] https://docs.openstack.org/glance/train/admin/cache.html#configuration-options-for-the-image-cache

Change-Id: Ic229e71978961546cec5f58a9c963c71e05ffba4
This commit is contained in:
Dmitriy Rabotyagov 2021-01-13 13:53:42 +02:00
parent 7c9b4258fa
commit b7673143de
4 changed files with 10 additions and 1 deletions

View File

@ -178,6 +178,7 @@ glance_keystone_auth_plugin: password
## Glance config
glance_image_cache_max_size: 10737418240
glance_image_cache_stall_time: 86400
# CORS options
glance_cors_allowed_origin: "{{ (glance_show_multiple_locations | bool) | ternary(openstack_service_publicuri_proto | default('http') + '://' + external_lb_vip_address, None) }}"

View File

@ -0,0 +1,5 @@
---
features:
- |
Added variable ``glance_image_cache_stall_time`` to control glance cache
time if needed. Defaults to ``86400``.

View File

@ -21,7 +21,10 @@ transport_url = {{ glance_oslomsg_rpc_transport }}://{% for host in glance_oslom
delayed_delete = False
scrub_time = 43200
image_cache_dir = {{ glance_system_user_home }}/cache/
image_cache_stall_time = {{ glance_image_cache_stall_time }}
image_cache_max_size = {{ glance_image_cache_max_size }}
# defaults to true if RBD is used as default store
show_image_direct_url = {{ glance_show_image_direct_url }}

View File

@ -9,7 +9,7 @@ admin_password = {{ glance_service_password }}
admin_user = {{ glance_service_user_name }}
admin_tenant_name = {{ glance_service_project_name }}
image_cache_dir = {{ glance_system_user_home }}/cache/
image_cache_stall_time = 86400
image_cache_stall_time = {{ glance_image_cache_stall_time }}
image_cache_max_size = {{ glance_image_cache_max_size }}
auth_url = {{ keystone_service_internalurl }}
filesystem_store_datadir = {{ glance_system_user_home }}/images/