Configuring the Glance image size limit and storage quota
The glance-api
and glance-registry
services are commonly configured to use /var
filesystem to store locally Glance images and to cache images locally. It is possible to limit the maximum image size that can be uploaded to glance to avoid filling the /var
filesystem or abusing the service.
Note
The maximum possible should be set to a value under 8 exabyte (9223372036854775808).
How to do it...
To limit the size of glance images, follow these steps:
- Set the maximum image size, in bytes, that can be uploaded through the
glance-api
service to 1 TB:[root@controller ~]# openstack-config --set /etc/glance/glance-api.conf default image_size_cap 1099511627776
- Restart the
glance-api
service:[root@controller ...
Get Production Ready OpenStack - Recipes for Successful Environments now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.