From 362e727dabd8d118d515208382d5849f01096eec Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Wed, 17 Dec 2014 06:22:02 -0600 Subject: [PATCH] Make image_cache_max_size user configurable image_cache_max_size should be less than the size of the container. It defaults to 10GiB which is greater than the current default container size for glance of 5GB. Change-Id: I58ad98ba3cf83a63dbe346659148aba53dafd140 Related-Bug: 1403487 --- etc/rpc_deploy/user_variables.yml | 3 ++- rpc_deployment/roles/glance_common/templates/glance-cache.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/rpc_deploy/user_variables.yml b/etc/rpc_deploy/user_variables.yml index 45765a3770..0efa456709 100644 --- a/etc/rpc_deploy/user_variables.yml +++ b/etc/rpc_deploy/user_variables.yml @@ -69,7 +69,8 @@ glance_swift_store_region: SomeRegion # `publicURL` to communicate with swift over the public network glance_swift_store_endpoint_type: internalURL glance_notification_driver: noop - +# Set glance cache size in bytes, should be less than container size. Defaults to 10GiB +#glance_image_cache_max_size: 4294967296 ## Heat Options heat_stack_domain_admin_password: diff --git a/rpc_deployment/roles/glance_common/templates/glance-cache.conf b/rpc_deployment/roles/glance_common/templates/glance-cache.conf index 96d747d193..2345321046 100644 --- a/rpc_deployment/roles/glance_common/templates/glance-cache.conf +++ b/rpc_deployment/roles/glance_common/templates/glance-cache.conf @@ -7,7 +7,7 @@ admin_tenant_name = service use_syslog = False image_cache_dir = /var/lib/glance/cache/ image_cache_stall_time = 86400 -image_cache_max_size = 10737418240 +image_cache_max_size = {{ glance_image_cache_max_size|default(10737418240) }} registry_host = {{ registry_host }} registry_port = 9191 auth_url = {{ auth_admin_uri }}