With image-volume cache enabled backend, volume creation for a smaller volume than image-volume cache has the same size of image-volume cache

Bug #1988803 reported by Keigo Noha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Wishlist
Pete Zaitcev
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

The issue is initially reported at https://bugzilla.redhat.com/show_bug.cgi?id=2100697.

In the current implementation, cinder doesn't have a check point of the volume size when image volume cache is enabled.
Due to that, the created volume whose requested size is smaller than the image cache volume has the same size of the image cache volume.

Reproducing steps:
1. Enable volume image cache feature in cinder.
2. Upload a cirros image to glance
3. Create a volume, Volume A,(e.g. 5GB) with the image as the first volume with the image.
4. Then create a smaller volume, Volume B, (e.g. 1GB) with the image.
5. Check actual volume image size on storage backend side.

Current behavior:
Volume A and Volume B have the same size(e.g. 5GB)
However, cinder shows Volume A is 5GB and Volume B is 1GB.

Expected behavior:
Volume A and Volume B have different size based on their requested size(Volume A is 5GB, Volume B is 1GB).

Tags: cache image
Changed in cinder:
importance: Undecided → Medium
tags: added: cache image
Changed in cinder:
importance: Medium → Wishlist
Revision history for this message
Keigo Noha (knoha) wrote :

I think there are several ways to fix this issue.

1. If the volume which is smaller size of image cache is requested, cinder should not create the volume with clone_volume method and it should be created as a new volume from the image.
2. Introduce a new image tag, like min_volume_size with value. If the tag is assigned, cinder created a image cache volume according to min_volume_size parameter, not requested volume size. After that, cinder clone the volume then extend the volume if needed.

Any inputs are welcomed.

Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :
Pete Zaitcev (zaitcev)
Changed in cinder:
assignee: nobody → Pete Zaitcev (zaitcev)
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.