-
Notifications
You must be signed in to change notification settings - Fork 268
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
qcow2 and virtual size prediction #3456
Comments
That is a good question, and we have given this some thought already. In general we would like to detect the size and just allocate the appropriate size PVC and everyone is happy. There are two sizes in play.
The problem is we can't reliably get the size of the image. From some sources we can (registry for instance). Others it is pretty much impossible to reliably get that information. This is the main reason we haven't implemented size detection at this point. |
I don't understand why that matters. The solution I proposed doesn't depend on that size being known in advance. |
@arnongilboa since you were looking at size detection in the past would you care to comment on this idea? One concern that was raised in the sig-storage meeting review of this issue is that this flow could work with DataVolumes but not with the new bare PVC populators approach. The reason this would be difficult in that scenario is that the user needs to create the desired PVC herself and that locks in the size. It would be strange to replace the PVC that was created to initiate the operation with a different PVC later. |
@aglitke I see no problem supporting this behavior with the new bare PVC populators approach, by using the mutating webhook rendering feature, which already supports rendering PVC missing size in the clone flow. In the old size-detection POC we went the other direction, initially trying small PVCs, and recreating/expanding the PVC with the correct size according to the failure message details. |
I would prefer to avoid automating the trial and error approach, it's very much prone to issues and tbh the use case of not knowing the OS in advance (and thus the size) is a little off to me. That said, I think that with an approach similar to #3103 |
Unlike the old direction, the idea suggested here is not exactly trial-and-error, as it assumes a "large enough" temporary pvc.
How can it be used in http import flow? |
Is your feature request related to a problem? Please describe:
Launching VMs using qcow2 images from 3rd parties presents a dilemma - I don't know what size PVC to allocate in advance. I also don't want to allocate significantly more storage to a VM than necessary. So far, I've just been using trial and error:
Describe the solution you'd like:
It'd be good if I could specify a maximum PVC size that I'm willing to accomodate. The importer would create a temporary PVC of that size to unpack the image into. If the PVC is too small then it throws an error, otherwise a PVC is created that matches the size of the unpacked image and that is used for the datavolume.
Describe alternatives you've considered:
I know I can use
qemu-img info
to find out the virtual size in advance, but I wondered if this step could be incorporated into CDI.Additional context:
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: