Created attachment 1712316 [details] the file to upload Description of problem: Trying to upload the small attached tgz file (not a disk, just some files) fails with the following error: could not process image header Version-Release number of selected component (if applicable): docker.io/kubevirt/cdi-uploadproxy:v1.21.0 How reproducible: Steps to Reproduce: 1. use the UI to upload the small tgz file attached to this bz 2. observe error 3. Actual results: upload fails Expected results: upload passes Additional info: logs from the upload pod: I0824 08:47:05.877045 1 uploadserver.go:63] Upload destination: /data/disk.img I0824 08:47:05.877285 1 uploadserver.go:65] Running server on 0.0.0.0:8443 I0824 08:47:11.731211 1 uploadserver.go:351] Content type header is "" I0824 08:47:11.731384 1 data-processor.go:301] Calculating available size I0824 08:47:11.731441 1 data-processor.go:313] Checking out file system volume size. I0824 08:47:11.731455 1 data-processor.go:321] Request image size not empty. I0824 08:47:11.731481 1 data-processor.go:326] Target size 1028173824. E0824 08:47:11.731530 1 upload-datasource.go:41] Error creating readers: could not process image header: unexpected EOF E0824 08:47:11.731612 1 data-processor.go:220] unexpected EOF could not process image header Unable to obtain information about data source kubevirt.io/containerized-data-importer/pkg/importer.(*DataProcessor).ProcessDataWithPause pkg/importer/data-processor.go:174 kubevirt.io/containerized-data-importer/pkg/uploadserver.newAsyncUploadStreamProcessor pkg/uploadserver/uploadserver.go:440 kubevirt.io/containerized-data-importer/pkg/uploadserver.(*uploadServerApp).uploadHandlerAsync.func1 pkg/uploadserver/uploadserver.go:358 net/http.HandlerFunc.ServeHTTP GOROOT/src/net/http/server.go:2007 net/http.(*ServeMux).ServeHTTP GOROOT/src/net/http/server.go:2387 kubevirt.io/containerized-data-importer/pkg/uploadserver.(*uploadServerApp).ServeHTTP pkg/uploadserver/uploadserver.go:287 net/http.serverHandler.ServeHTTP GOROOT/src/net/http/server.go:2802 net/http.(*conn).serve GOROOT/src/net/http/server.go:1890 runtime.goexit src/runtime/asm_amd64.s:1357 E0824 08:47:11.731663 1 uploadserver.go:363] Saving stream failed: Unable to obtain information about data source: could not process image header: unexpected EOF
It seems like if this is the intention then we'd only want to surface the upload capability as a virtualization specific feature. That might impact how the UI should deliver this feature. Hopefully this is just a bug though :)
tar.gz files are not supported. Please see https://docs.openshift.com/container-platform/4.5/virt/virtual_machines/importing_vms/virt-importing-virtual-machine-images-datavolumes.html#virt-cdi-supported-operations-matrix_virt-importing-virtual-machine-images-datavolumes for more information about supported formats.
I think we should clarify that there are file types that aren't supported. It may just be a link to the docs that says see here for supported formats.
We should also provide an error that is more informative and point the user to the docs to better understand that supported types.
In that case: 1: we need to name the button a bit differently. Something like: "New with OS Image Upload" 2: Probably the info msg on top should say something clarifying that this is only working for images and a link to docs to full metrics 3: Instead of the generic error we have today: "Error Uploading Data Request failed with status code 500" Have an error saying also: "Please make sure you are uploading one of the supported formats" and a link to the doc. @Matt: agree? Moving this to UI than.
Here's a revised design for this with this recent update https://xd.adobe.com/view/5a6ff231-89d3-44de-8f18-f2f4a5299636-0f3c/ I agree with Tomas the alert for an upload that fails due to file format should be: File upload failed The format of the file you are uploading is not supported. Please use one of the supported formats. Learn more about supported formats
Created attachment 1712585 [details] proposed error text Here is what that error could look like
It would be nice to not force the user out of the flow to see supported types. We could embed that table into the info alert at the top I just would be concerned that the supported types could change and the alert wouldn't be updated.
@alitke .img and .iso are supported aswell I assume? are they considered under the RAW category?
(In reply to Adam Litke from comment #2) > tar.gz files are not supported. Please see > https://docs.openshift.com/container-platform/4.5/virt/virtual_machines/ > importing_vms/virt-importing-virtual-machine-images-datavolumes.html#virt- > cdi-supported-operations-matrix_virt-importing-virtual-machine-images- > datavolumes for more information about supported formats. .img and .iso are supported aswell I assume? are they considered under the RAW category?
After click browse and navigate local files, only .img .iso .qcow2 are showing for select, .tar are not showing to use. Move bug to verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196