add support for image cache

Bug #1869903 reported by Edward Hope-Morley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Cinder Charm
Fix Released
Medium
Eric Chen

Bug Description

If you boot a vm from a bootable volume and that volume, when that volume is created it might be necessary to convert the image to raw format if it is stored as qcow2 in Glance. By default Cinder will not cache downloaded images but doing so can save a lot of time when booting from volume where conversions and/or downloads are necessary.

https://docs.openstack.org/cinder/latest/admin/blockstorage-image-volume-cache.html

Changed in charm-cinder:
milestone: none → 20.05
importance: Undecided → Medium
David Ames (thedac)
Changed in charm-cinder:
milestone: 20.05 → 20.08
James Page (james-page)
Changed in charm-cinder:
milestone: 20.08 → none
tags: added: onboarding
Revision history for this message
David Ames (thedac) wrote :

Bug hygiene:

Triage:

Adding the following to the template and any other requirements per the doc [0]

[ceph]
image_volume_cache_enabled

1) Add a config option to turn on the cache which should default to off
2) Update pertinent templates i.e. parts/backends
3) * Potentially add config options or calculations for image_volume_cache_max_size_gb and image_volume_cache_max_count.

* Keep in mind cinder instances are most often in a LXD container and may not have an infinite amount of disk space.

This would make an excellent on-boarder task.

[0] https://docs.openstack.org/cinder/latest/admin/blockstorage-image-volume-cache.html

Changed in charm-cinder:
status: New → Triaged
tags: added: good-first-bug
removed: onboarding
Eric Chen (eric-chen)
Changed in charm-cinder:
assignee: nobody → YenHung Chen (eric-chen)
Revision history for this message
Eric Chen (eric-chen) wrote (last edit ):

I will start to do the implementation.
Here is the my initial proposal.

Add 3 configuration in charm-cinder

image-volume-cache-enabled:
   type: boolean
   default: False
   description: Enable the image volume cache

image-volume-cache-max-size-gb:
   type: int
   default: 0
   description: Max size of the image volume cache in GB. 0 => unlimited

image-volume-cache-max-count:
   type: int
   default: 0
   description: Max number of entries allowed in the image volume cache. 0 => unlimited.

When `image-volume-cache-enabled` is enabled, three configuration will be generated in cinder.conf under [DEFAULT]

```
[DEFAULT]
image_volume_cache_enabled = true
image_volume_cache_max_size_gb = 0
image_volume_cache_max_count = 0

```

I propose to put it under [DEFAULT] session to handle the basic situation: there is only 1 backend or all the backends use the same cache settings.

Anyone who are interested in this feature, welcome to leave your comment.

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

@Eric this sounds good and is in line with the upstream defaults. [1]

[1] https://docs.openstack.org/cinder/latest/configuration/block-storage/samples/cinder.conf.html

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-cinder (master)
Changed in charm-cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-cinder (master)

Change abandoned by "<email address hidden> <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charm-cinder/+/808575

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :
Changed in charm-cinder:
status: In Progress → Fix Committed
milestone: none → 21.10
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-cinder (master)

Reviewed: https://review.opendev.org/c/openstack/charm-cinder/+/808576
Committed: https://opendev.org/openstack/charm-cinder/commit/dd5137c2e77da52a27f7aceb47370f0b371029b3
Submitter: "Zuul (22348)"
Branch: master

commit dd5137c2e77da52a27f7aceb47370f0b371029b3
Author: eric-chen <email address hidden>
Date: Sun Sep 12 15:50:58 2021 +0800

    Add support for configuring image volume cache

    Support new configuration to turn on image volume cache in Cinder
    service. User can control the maximum size and count from
    configuration too.

    Closes-Bug: #1869903
    Change-Id: If96dbb9c0974bfa1f6d67405bb430a7cd251f821

Changed in charm-cinder:
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.