Skip to content

image cache size - #361

Open
pronix wants to merge 3 commits into
stable/2025.1-m3from
image_cache_size
Open

pronix wants to merge 3 commits into
stable/2025.1-m3from
image_cache_size

Conversation

@pronix

@pronix pronix commented Sep 11, 2026

Copy link
Copy Markdown

code and unit tests for issue cinder 60

@Scsabiii

Copy link
Copy Markdown

This is not exaclty what i wanted.
The volume size should match the image.virtual_size only before calling the
self._register_image_in_cache(volume, image_id)
Than we need to extend the volume to the volume.size:
image_utils.resize_image(self.local_path(volume), volume.size,
run_as_root=self._execute_as_root)
data = image_utils.qemu_img_info(self.local_path(volume),
run_as_root=self._execute_as_root)
virt_size = data.virtual_size // units.Gi
if virt_size != volume.size:
raise exception.ImageUnacceptable.....

Your patch restricts the volume.size == image.virtual_size.
What i want is only to make the cached image small, so the cache should still have image.virtual_size
And the volume.size can be anyting >= to the image.virtual_size....
So the matching is ok, but it can be bigger too...

@Scsabiii

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants