Charm option for setting image_size_cap / image-size-cap

Bug #1720040 reported by Mihaela Andronic
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Glance Charm
Fix Released
Wishlist
Przemyslaw Hausman

Bug Description

Hi

I couldn't find any traces of the glance image_size_cap functionality from glance settings record in the juju set/get charm changes.

The parameter for configuring this in the Openstack glance documentation https://docs.openstack.org/mitaka/config-reference/image-service/api.html

"image_size_cap¶
Type: integer
Default: 1099511627776
Minimum Value: 1
Maximum Value: 9223372036854775808
Maximum size of image a user can upload in bytes. An image upload greater than the size mentioned here would result in an image creation failure. This configuration option defaults to 1099511627776 bytes (1 TiB). NOTES: * This value should only be increased after careful consideration and must be set less than or equal to 8 EiB (9223372036854775808). * This value must be set with careful consideration of the backend storage capacity. Setting this to a very low value may result in a large number of image failures. And, setting this to a very large value may result in faster consumption of storage. Hence, this must be set according to the nature of images created and storage capacity available. Possible values: * Any positive number less than or equal to 9223372036854775808"

and on the set-ups glance charm unit the configs have the parameter
$ grep -r "image_size_cap" /etc/glance/
/etc/glance/glance-cache.conf:#image_size_cap = 1099511627776
/etc/glance/glance-scrubber.conf:#image_size_cap = 1099511627776

just no way to access it with charm set setting; could not find a bug for the option missing under the glance charm so filing this one;

Use case: "restrict the size of the images regular users upload to Glance via Horizon; Because we don't want users to upload excessively big images, like 30Gb+" .
Is this setting available in another format?

Thank you,
//MA

description: updated
Revision history for this message
James Page (james-page) wrote :

It might be possible to inject this today using the config-flags option.

Changed in charm-glance:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: canonical-bootstack
Revision history for this message
Christian Reis (kiko) wrote :

Here's what's currently being used for this:

  juju config glance api-config-flags='image_size_cap=549755813888'

Ryan Beisner (1chb1n)
Changed in charm-glance:
assignee: nobody → Przemyslaw Hausman (phausman)
milestone: none → 19.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/624040

Changed in charm-glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.openstack.org/624040
Committed: https://git.openstack.org/cgit/openstack/charm-glance/commit/?id=046f20f3bc5655a0820f0d1a8eefb7be70f50ac3
Submitter: Zuul
Branch: master

commit 046f20f3bc5655a0820f0d1a8eefb7be70f50ac3
Author: Przemysław Hausman <email address hidden>
Date: Mon Dec 10 10:58:37 2018 +0100

    Add support for image_size_cap in charm config

    Glance supports image_size_cap setting. This setting controls maximum
    size of image a user can upload. An image upload greater than the size
    mentioned here would result in an image creation failure.

    This commit adds support for setting image_size_cap parameter in charm
    config. It can be manipulated during the runtime with `juju config'
    command.

    Change-Id: I0af1c6a503a87941b7c8ee34255583652e54f0cc
    Closes-Bug: #1720040

Changed in charm-glance:
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-glance:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.