With image-volume cache enabled backend, volume creation for a smaller volume than image-volume cache has the same size of image-volume cache
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:/
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).
Changed in cinder: | |
importance: | Undecided → Medium |
tags: | added: cache image |
Changed in cinder: | |
importance: | Medium → Wishlist |
Changed in cinder: | |
assignee: | nobody → Pete Zaitcev (zaitcev) |
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.