Draft
Conversation
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
1e387a0 to
3938798
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fix unpacked size detection for VirtualImage and ClusterVirtualImage created from VirtualDiskSnapshot via PVC.
The change updates the PVC-backed VirtualImage ready flow to use the requested PVC size as the unpacked size instead of the bound PVC capacity. This avoids reporting inflated unpacked size when the storage backend rounds PVC capacity up.
Also added unit tests for:
Why do we need it, and what problem does it solve?
When a VirtualImage is created from VirtualDiskSnapshot on PVC storage, the controller previously used
pvc.status.capacityfor both stored and unpacked size.On some storage backends,
status.capacitycan be greater than the requested restore size. As a result,.status.size.unpackedwas reported incorrectly for VirtualImage and then propagated further to ClusterVirtualImage.This change makes unpacked size reflect the requested PVC size, which matches the logical image size and prevents incorrect size reporting in VI/CVI status.
What is the expected result?
status.size.storedmatches the actual PVC capacity;status.size.unpackedmatches the requested PVC size;Checklist
Changelog entries