You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
code and unit tests for issue cinder 60