Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1515852

Summary: When resuming an upload that was auto-paused because of a browser refresh, the upload is paused again
Product: [oVirt] ovirt-engine Reporter: Idan Shaby <ishaby>
Component: Frontend.WebAdminAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Avihai <aefrat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: amureini, bugs, derez, ishaby, ratamir
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
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: 2017-12-20 10:43:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Idan Shaby 2017-11-21 13:37:47 UTC
Description of problem:
When resuming an upload that was auto-paused because of a browser refresh, the upload is paused again.

Version-Release number of selected component (if applicable):
2e39dce667aa4f432e699b4b453ddd2ae008221c

How reproducible:
100%

Steps to Reproduce:
1. Start an image upload via the UI.
2. After some progress, refresh the webadmin tab in tab browser.
3. Wait ~ one minute until the transfer is paused automatically and resume it manually.

Actual results:
After a few seconds, the transfer is paused again.

Expected results:
The transfer should continue.

Additional info:
From the engine log:
2017-11-21 11:48:39,147+02 INFO  [org.ovirt.engine.core.bll.storage.disk.image.TransferDiskImageCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-19) [8039af12-b605-4444-b9de-bdc223fb7f1d] Transfer was paused by system. Upload disk 'RHEL-7.0-20140507.0-Server-x86_64-dvd1.iso' (id '00000000-0000-0000-0000-000000000000')

From the proxy log:
Thread-62 ) ERROR root:Failed: {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "detail": "Invalid content-range: 'bytes 542113792--1/0'", "title": "Bad Request"}
(Thread-62 ) WARNING web:ERROR [10.35.1.94] PUT /images/f61a1dff-9082-434f-b393-8dc0b2fb918a: [400] Failed response from host: {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "detail": "Invalid content-range: 'bytes 542113792--1/0'", "title": "Bad Request"} (0.01s)


From the browser log:
INFO: sendChunk: PUT https://ishaby1.tlv.redhat.com:54323/images/f61a1dff-9082-434f-b393-8dc0b2fb918a bytes 542113792--1/0
PUT https://ishaby1.tlv.redhat.com:54323/images/f61a1dff-9082-434f-b393-8dc0b2fb918a 400 (Bad Request)
Failed to load https://ishaby1.tlv.redhat.com:54323/images/f61a1dff-9082-434f-b393-8dc0b2fb918a: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ishaby1.tlv.redhat.com:8080' is therefore not allowed access. The response had HTTP status code 400.
webadmin-0.js:19828 Tue Nov 21 11:48:20 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
SEVERE: xhrHandle: Status: 0, text: , response: 
Tue Nov 21 11:48:20 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
SEVERE: xhrError: 0 
Tue Nov 21 11:48:20 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
WARNING: xhrError: Retrying (attempt 1 of 3)

And after 3 attempts (browser log):

Tue Nov 21 11:48:29 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
SEVERE: Transfer to proxy failed, code: 0, text: , response: 
Tue Nov 21 11:48:29 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
WARNING: Finalizing upload with status CLIENT_ERROR
Tue Nov 21 11:48:29 GMT+200 2017 org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageHandler
INFO: Updating status to Paused by System

Comment 2 Avihai 2017-12-03 15:37:42 UTC
Created attachment 1362271 [details]
logs

Comment 11 Sandro Bonazzola 2017-12-20 10:43:17 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.