Bind mount glance cache directory

By default glance has ~10GB available to cache images on within it's
container.  Some images exceed that size causing image uploads to fail.
To work around this we can mount the image cache directory on the host.

This has the same danger as bind mounting the image directory (filling
up the host disk), so it's not a new danger, just one to be called out.

Change-Id: I887180b165a802a8d3635c2ad5b2284a123e230d
This commit is contained in:
Matthew Thode 2018-08-22 10:42:07 -05:00
parent dda0674306
commit fb5a5cff7f
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8
2 changed files with 13 additions and 0 deletions

View File

@ -33,3 +33,5 @@ glance_venv_download_url: "{{ venv_base_download_url }}/glance-{{ openstack_rele
glance_container_bind_mounts:
- bind_dir_path: "/var/lib/glance/images"
mount_path: "/openstack/{{ inventory_hostname }}"
- bind_dir_path: "/var/lib/glance/cache"
mount_path: "/openstack/{{ inventory_hostname }}"

View File

@ -0,0 +1,11 @@
---
features:
- |
Glance containers will now bind mount the default glance cache directory
from the host when glance_default_store is set to file and nfs is not in
use. With this change, the glance file cache size is no longer restricted
to the size of the container file system.
upgrade:
- |
Glance containers will be rebooted to add the glance cache bind mount if
glance_default_store is set to file and nfs is not in use.