Comment 5 for bug 1029950

Revision history for this message
Derek Higgins (derekh) wrote :

Thierry I see your point about billing the customer for space used in glance but I still think glance needs protection from a user exausting all diskspace with one http call. Reducing and fully enforcing the limit on image size will do this and also result in protecting Nova, since all images are download via the API.

It looks to me like IMAGE_SIZE_CAP needs to be reduced from 1PiB to something more resonable (10GiB maybe?), and also it could be made configurable (or a tenant quota, probably not suitable if back porting to essex is considered).

Then all methods of "POST /v1/images" need to respect this value, if passed as a header with the http POST or calculated while it is being uploaded if not in the http headers.

Finally if using the x-image-meta-location: header Glance needs also to respect the image size which was registered for an image, (to protect it from the image size increasing between registration and usage). currlently it reports the size registered when a HTTP HEAD is done against /v1/images/<uuid> but returns the changed size when a HTTP GET is done. So nova downloads the new size (regardless of what was registered)