Bug 1963027

Summary: Upload qcow2 to PVC too small : "Error Uploading Data Request fail with status code 400"
Product: OpenShift Container Platform Reporter: Robert Bohne <rbohne>
Component: Console Kubevirt PluginAssignee: Gilad Lekner <glekner>
Status: CLOSED ERRATA QA Contact: YaoJinbo <jyao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs, cnv-qe-bugs, glekner, gouyang, jyao, yadu, ycui, yzamir
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:31:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot none

Description Robert Bohne 2021-05-21 07:58:51 UTC
Created attachment 1785423 [details]
Screenshot

Description of problem:

If I upload a qcow2 into an to small PVC I got the error:  "Error Uploading Data Request fail with status code 400" this is not very userfrindly. 

The content upload pod have a propper error messages: 

I0521 07:30:39.561331       1 uploadserver.go:70] Upload destination: /data/disk.img
I0521 07:30:39.561412       1 uploadserver.go:72] Running server on 0.0.0.0:8443
I0521 07:30:42.506193       1 uploadserver.go:313] Content type header is ""
I0521 07:30:42.506255       1 data-processor.go:324] Calculating available size
I0521 07:30:42.506400       1 data-processor.go:336] Checking out file system volume size.
I0521 07:30:42.506443       1 data-processor.go:344] Request image size not empty.
I0521 07:30:42.506456       1 data-processor.go:349] Target size 240Gi.
I0521 07:30:42.506477       1 data-processor.go:232] New phase: TransferScratch
I0521 07:30:42.506668       1 util.go:161] Writing data...
I0521 07:30:45.518054       1 data-processor.go:232] New phase: ValidatePause
I0521 07:30:45.518141       1 data-processor.go:238] Validating image
E0521 07:30:45.525926       1 data-processor.go:229] Virtual image size 300647710720 is larger than available size 243524645683 (PVC size 300647710720, reserved overhead 0.055000%). A larger PVC is required.
E0521 07:30:45.525960       1 uploadserver.go:325] Saving stream failed: Virtual image size 300647710720 is larger than available size 243524645683 (PVC size 300647710720, reserved overhead 0.055000%). A larger PVC is required.

It would be very useful to print the Pod log or the info in wich pod I have to look into the WebUi.


Version-Release number of selected component (if applicable):
CNV 2.6.2

How reproducible:

Upload a qcow2 image into an PVC that is to small

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yaacov Zamir 2021-06-02 06:35:16 UTC
The UI use CDI to upload images, and take the error message from the data volume status conditions,

Moving to storage:
a - is there a way to upload without pre-specifying the PVC size ?
b - can CDI show better status/condition message in this case ?

Comment 2 Yan Du 2021-06-02 12:26:14 UTC
(In reply to Yaacov Zamir from comment #1)
> The UI use CDI to upload images, and take the error message from the data
> volume status conditions,
> 
> Moving to storage:
> a - is there a way to upload without pre-specifying the PVC size ?
It is too large RFE, maybe it will be implement in another way in the future
> b - can CDI show better status/condition message in this case ?
If you use datavolume which we support in cnv, you will get the error message

Comment 4 Guohua Ouyang 2021-06-29 06:52:57 UTC
there are still two problems of this issue:
1. it's still showing below erro when using Storage -> Upload data with form
"Upload Error
Request failed with status code 400“

2. on VM list or template list page, it shows "Unable to process data: Virtual image size 4294967296 is larger than available size 524288000 (PVC size 4294967296, reserved overhead 0.000000%). A larger PVC is required." at first, but it becomes something like "back-off 5m0s restarting failed container=importer pod=importer-rhel7-great-flea_default(b7de0279-1a21-4e7b-8473-ea80c3d872f2)" after a while.

It seems the last message about restarting the container show up, can it stay at the first error message?

$ oc describe dv rhel7-great-flea
  Warning  Error             3m46s (x9 over 20m)  datavolume-controller  Unable to process data: Virtual image size 4294967296 is larger than available size 524288000 (PVC size 4294967296, reserved overhead 0.000000%). A larger PVC is required.
  Warning  CrashLoopBackOff  3m30s (x3 over 13m)  datavolume-controller  back-off 5m0s restarting failed container=importer pod=importer-rhel7-great-flea_default(b7de0279-1a21-4e7b-8473-ea80c3d872f2)

Comment 6 YaoJinbo 2021-08-24 09:34:51 UTC
Reproduced on the OCP 4.9,it's still showing error
"Upload Error
Request failed with status code 400"

Comment 7 Guohua Ouyang 2021-08-25 11:45:29 UTC
@Jinbo,
Could you check this again on latest master? I did a test and it works for me.

Comment 8 YaoJinbo 2021-09-01 09:38:29 UTC
Verified on the latest master. Success to upload a qcow2 image into an PVC that is to small

Comment 11 errata-xmlrpc 2021-10-18 17:31:44 UTC
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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759