-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volume: allow extend cow preallocated #380
Merged
aesteve-rh
merged 7 commits into
oVirt:ovirt-4.5.3.z
from
aesteve-rh:aesteve/extend-row-preallocated
Feb 27, 2023
Merged
volume: allow extend cow preallocated #380
aesteve-rh
merged 7 commits into
oVirt:ovirt-4.5.3.z
from
aesteve-rh:aesteve/extend-row-preallocated
Feb 27, 2023
Conversation
This file contains 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 test to extend volume size. Preallocated volumes (both raw and cow) should extend to prevent VMs from pausing when reaching the volume truesize limit. Test is used to reproduce the issue in https://bugzilla.redhat.com/2170689 Signed-off-by: Albert Esteve <aesteve@redhat.com>
@aesteve-rh please fix the pr and commit message to describe only the You can add a comment like:
|
ahadas
previously approved these changes
Feb 22, 2023
+1 |
Currently we consider the format to determine when to skip the extend calls, so that cow volumes are always skipped. However, the allocation policy is more important. For preallocated volumes it would make more sense to extend the volumes so that they capacity matches their truesize, and thus it also matches user expectations. NOTE: commit message was updated to reflect the actual fix better Bug-Url: https://bugzilla.redhat.com/2170689 Signed-off-by: Albert Esteve <aesteve@redhat.com>
Rename '_extendSizeRaw' to just '_extendSize', as COW preallocated volumes can also reach this call to extend LVs. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Add a test to ensure that extendSize is correctly skipped for cow sparse volumes. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Volume cannot be a different format than cow or raw, therefore checking for it in a condition is not necessary. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Change extend skip condition (and msg), so that it better reflects the intent. We want to skip the extend call based on the allocation type and not the format, so that we skip sparse volumes Signed-off-by: Albert Esteve <aesteve@redhat.com>
Current extend_volume_skipped test checks only that the volume remains under the original capacity. While this covers the usecase of the volume not being extended to the new capacity, it does not check that the volume size has not changed. We can make the check more precise with little effort. Fixes: a558d52 Signed-off-by: Albert Esteve <aesteve@redhat.com>
aesteve-rh
force-pushed
the
aesteve/extend-row-preallocated
branch
from
February 27, 2023 15:04
cbdf58e
to
bda921b
Compare
nirs
approved these changes
Feb 27, 2023
ahadas
approved these changes
Feb 27, 2023
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.
Backport for #379
Currently we assume in the code that cow
volumes do not need to be extended in any case.
However, all preallocated volumes, both
cow and raw, should be extended when requested.
Otherwise, cow preallocated volumes have bigger
capacity than their truesize. Thus, when the size
of the disk reaches the truesize, the VM will
pause, which is an undesired effect.
To avoid this, we relax this assumption so that
only cow sparse volumes are skipped on extend calls.
Bug-Url: https://bugzilla.redhat.com/2170689
Signed-off-by: Albert Esteve aesteve@redhat.com