Bug 1328877

Summary: Image Upload: UI doesn't respond gracefully for a proxy failure when resuming an upload.
Product: [oVirt] ovirt-engine Reporter: Natalie Gavrielov <ngavrilo>
Component: BLL.StorageAssignee: Amit Aviram <aaviram>
Status: CLOSED CURRENTRELEASE QA Contact: Natalie Gavrielov <ngavrilo>
Severity: high Docs Contact:
Priority: medium    
Version: 4.0.0CC: aaviram, amureini, bugs, sbonazzo, tnisan, ykaul
Target Milestone: ovirt-4.0.4Flags: ykaul: ovirt-4.0.z?
ngavrilo: planning_ack?
amureini: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:36:45 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:
Attachments:
Description Flags
logs: engine, proxy, vdsm, chrome
none
snapshot resuming upload that was paused by the system none

Description Natalie Gavrielov 2016-04-20 13:10:20 UTC
Created attachment 1149091 [details]
logs: engine, proxy, vdsm, chrome

Description of problem:

Resuming an upload that was paused by the user / system not working. 

Version-Release number of selected component:
ovirt-engine-4.0.0-0.0.master.20160310051350.git3151c66.el7.centos.noarch
ovirt-image-common-0.1-1.noarch
vdsm-4.17.999-724.gitb8cb30a.el7.centos.noarch
ovirt-image-daemon-0.1-1.noarch

How reproducible:
100% (I had a few times which it worked.. but I'm unable to reproduce that success). 

Steps to Reproduce:

1. Upload an image.
2. Pause it.
3. Resume upload.

Actual results:

In case it was paused by the user, status "Resuming" is displayed.. but it's not really continuing with the upload.
In case the system paused the upload - after resuming it (clicking "OK" in the dialog window), the dialog window stays (not closing as should), displays waiting animation. 

Expected results:

Upload resumed.

Comment 1 Natalie Gavrielov 2016-04-20 13:13:19 UTC
Created attachment 1149092 [details]
snapshot resuming upload that was paused by the system

Comment 2 Red Hat Bugzilla Rules Engine 2016-04-20 13:28:39 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 3 Sandro Bonazzola 2016-05-02 09:52:28 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 4 Yaniv Lavi 2016-05-23 13:15:32 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 5 Yaniv Lavi 2016-05-23 13:20:48 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Amit Aviram 2016-06-15 14:23:43 UTC
(In reply to Natalie Gavrielov from comment #0)
> Created attachment 1149091 [details]
> logs: engine, proxy, vdsm, chrome
> 
> Description of problem:
> 
> Resuming an upload that was paused by the user / system not working. 
> 
> Version-Release number of selected component:
> ovirt-engine-4.0.0-0.0.master.20160310051350.git3151c66.el7.centos.noarch
> ovirt-image-common-0.1-1.noarch
> vdsm-4.17.999-724.gitb8cb30a.el7.centos.noarch
> ovirt-image-daemon-0.1-1.noarch
> 
> How reproducible:
> 100% (I had a few times which it worked.. but I'm unable to reproduce that
> success). 
> 
> Steps to Reproduce:
> 
> 1. Upload an image.
> 2. Pause it.
> 3. Resume upload.
> 
> Actual results:
> 
> In case it was paused by the user, status "Resuming" is displayed.. but it's
> not really continuing with the upload.
> In case the system paused the upload - after resuming it (clicking "OK" in
> the dialog window), the dialog window stays (not closing as should),
> displays waiting animation. 
> 
> Expected results:
> 
> Upload resumed.

This doesn't happen in the regular flow as described in the "stepts to reproduce" in the current version. However, looking at the logs, there was a proxy failure when trying to send the data:

(Thread-6353) ERROR 2016-04-20 15:30:28,004 server:135:root:(dispatch) Internal error: The client disconnected while sending the POST/PUT body (720896 more bytes were expected)

Probably the UI doesn't respond to that gracefully. so that's the actual bug here.

Yaniv, I guess the priority and maybe target milestone might be retargeted in that case.. so I'm bringing that to your attention.

Comment 7 Allon Mureinik 2016-07-27 11:24:34 UTC
With all the recent fixes in 4.0.2, this is a relatively rare double-failure case.
Pushing out to 4.0.4.

Comment 8 Amit Aviram 2016-08-17 10:08:31 UTC
Not backported yet

Comment 9 Natalie Gavrielov 2016-09-05 15:36:38 UTC
(In reply to Amit Aviram from comment #6)
> (In reply to Natalie Gavrielov from comment #0)
> This doesn't happen in the regular flow as described in the "steps to
> reproduce" in the current version. However, looking at the logs, there was a
> proxy failure when trying to send the data:

Is the following scenario good enough?
1. Start an upload
2. Pause an upload
3. Stop the proxy service
4. Resume the upload

Comment 10 Amit Aviram 2016-09-06 11:25:51 UTC
(In reply to Natalie Gavrielov from comment #9)
> (In reply to Amit Aviram from comment #6)
> > (In reply to Natalie Gavrielov from comment #0)
> > This doesn't happen in the regular flow as described in the "steps to
> > reproduce" in the current version. However, looking at the logs, there was a
> > proxy failure when trying to send the data:
> 
> Is the following scenario good enough?
> 1. Start an upload
> 2. Pause an upload
> 3. Stop the proxy service
> 4. Resume the upload

Sure, looks good.

Comment 11 Natalie Gavrielov 2016-09-07 09:12:58 UTC
Verified with the scenario described in comment #9.
The upload pauses, and an Audit log message saying:
Unable to upload image to disk 80c268df-2a65-4b1f-897a-c269ad3e5ce7 due to a network error. Make sure ovirt-imageio-proxy service is installed and configured, and ovirt-engine's certificate is registered as a valid CA in the browser.

Builds used:
rhevm-4.0.4-0.1.el7ev.noarch
vdsm-4.18.12-1.el7ev.x86_64
ovirt-imageio-proxy-0.3.0-0.el7ev.noarch
ovirt-imageio-common-0.3.0-0.el7ev.noarch
ovirt-imageio-daemon-0.3.0-0.el7ev.noarch