-
Notifications
You must be signed in to change notification settings - Fork 267
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
[WIP] Revert to using nbdkit for http conversion imports #3212
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Due to slow performance we stopped using nbdkit for most kind of imports. This new behavior introduced minor differences such as stop converting raw images, which caused inconsistencies in some tests. Since nbdkit performance issues have been addressed in v1.35.8, this commit reverts back to the old behavior. Signed-off-by: Alvaro Romero <alromero@redhat.com>
fc4d6a4
to
3abfa19
Compare
/test pull-cdi-unit-test |
@alromeros: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
return ProcessingPhaseConvert, nil | ||
} else { | ||
if hs.readers.Archived || hs.customCA != "" { | ||
return ProcessingPhaseTransferDataFile, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should return ProcessingPhaseTransferScratch here if we want to have proper preallocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this comment earlier and understood the opposite #2832 (comment), should we return transferScratch when preallocation is false or true? Anyway, I'm thinking of simplifying this PR to just address this bug so we can backport it safely and reconsider the usage of nbdkit again in a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So
// convert is called when convert the image from the url to a RAW disk image. Source formats include RAW/QCOW2 (Raw to raw conversion is a copy) |
I also think we have some testing of sparse images in e2e so worth to see if we can reduce this from the Windows case
So looking into this further, I think our error is that we have flows where we don't use I think we should always go through with Regarding e2e, we have the setup to test this today with images like tinycore.iso and cirros.raw. EDIT:
|
Thanks for the analysis, @akalenyu. Yeah, at least according to this flowchart we should be converting all kubevirt imgs, something we aren't doing. I think the safest way to accomplish this PR in a backportable way is to just avoid conversion of archived files and transfer to scratch every other. I think I'll first do that in this PR so we can backport it safely and then consider using nbdkit again in a follow-up. |
Yeah but then using scratch for raw is also painful (2x windows image)... let's see what others think |
Closing this PR following the conversation during the sig-storage meeting: For consistency, we've decided to prioritize the scratch space flow for most imports as it's reliable and will allow us to keep using qemu-img convert. Will open a follow-up with a simple fix in the importer flow. |
What this PR does / why we need it:
Due to some performance issues discussed in #2809, we stopped using nbdkit for most http imports. This new behavior introduced minor differences in some specific flows, such as stopping the conversion of uncompressed raw images.
The conversion process made the actual size of raw images significantly smaller, probably because of qemu's handling of sparse images. The import of raw images without conversion ended up causing failures in some tests, as imported images had a significant increase in size.
Since nbdkit performance issues have been addressed in v1.35.8 (and now we use v1.36.2), this pull request aims to revert to the old behavior.
Example:
Fresh image import before this PR:
Fresh image import after this PR (due to convert):
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes # https://issues.redhat.com/browse/CNV-36026
Special notes for your reviewer:
Check #2809 and #2832 for more context about the original change and why it's safe to revert now.
If we prefer to keep this behavior and avoid using nbdkit, an alternative would be to use scratch for uncompressed raw images.
Release note: