Bug 1533362 - StreamingAPI - successful cancel Upload/Download disk via UI should not finish as an ERROR in Engine.log/UI event log as this was requested by user & completed successfully
Summary: StreamingAPI - successful cancel Upload/Download disk via UI should not fini...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.3.5
: 4.3.5.2
Assignee: Fedor Gavrilov
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-11 07:34 UTC by Avihai
Modified: 2019-07-30 14:08 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.3.5.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-30 14:08:31 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.3+
rule-engine: exception+


Attachments (Terms of Use)
engine log (170.19 KB, application/x-gzip)
2018-01-11 07:34 UTC, Avihai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 100010 0 master MERGED engine: treat image transfers cancelled by user/system differently 2020-01-28 18:16:57 UTC
oVirt gerrit 100027 0 master MERGED Treat image transfers cancelled by user/system differently 2020-01-28 18:16:58 UTC
oVirt gerrit 100456 0 model_4.3 MERGED Treat image transfers cancelled by user/system differently 2020-01-28 18:16:57 UTC
oVirt gerrit 100941 0 ovirt-engine-4.3 MERGED engine: treat image transfers cancelled by user/system differently 2020-01-28 18:16:57 UTC

Description Avihai 2018-01-11 07:34:09 UTC
Created attachment 1379860 [details]
engine log

Description of problem:
After Cancel Upload/Download disk was successful via UI I would expect that it should not give ERROR's in Engine log or UI event log but to give a message that cancel transfer was completed successfully & in engine log give an INFO message.

I expect ERRORs in log/UI when cancel download/upload operation fails. 

Version-Release number of selected component (if applicable):
4.2.1-0.2.el7


How reproducible:
100%

Steps to Reproduce:
1.Start upload/download disk image
2.Cancle upload/download operation

Actual results:
Although cancel is successful we throw an error message in the UI/engine log.


2018-01-11 09:22:21,759+02 ERROR [org.ovirt.engine.core.bll.storage.disk.image.TransferDiskImageCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-52) [0f51677a-7ec1-4bba-905f-cb16eeb2ae56] Transfer failed. Upload disk 'Fedora-Workstation-netinst-x86_64-26-1.5.iso' (id '00000000-0000-0000-0000-000000000000')
2018-01-11 09:22:22,776+02 INFO  [org.ovirt.engine.core.bll.storage.disk.image.ImageTransferUpdater] (EE-ManagedThreadFactory-engineScheduled-Thread-79) [0f51677a-7ec1-4bba-905f-cb16eeb2ae56] Updating image transfer 996c1428-a97f-4cdf-a088-136b2513bcfd (image 917556a9-041b-424a-8823-453082cb2ef7) phase to Finished Failure (message: 'Sent 11.171875MB')
2018-01-11 09:22:22,837+02 ERROR [org.ovirt.engine.core.bll.storage.disk.image.TransferDiskImageCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-79) [0f51677a-7ec1-4bba-905f-cb16eeb2ae56] Failed to transfer disk '00000000-0000-0000-0000-000000000000' (command id '996c1428-a97f-4cdf-a088-136b2513bcfd')

Expected results:
If cancel is successful do not throw an error message in the UI/engine log.


Additional info:

Comment 1 Daniel Erez 2018-01-11 09:16:26 UTC
This behaviour is actually by design, cancelling a transfer operation initiates the failure flow (which clears the ImageTransfer). Thus, we output a failure log ("Failed to transfer disk..."), to indicate that the transfer indeed failed. So, the log could be either ERROR or WARN.

@Yaniv/Allon - any take on that? Should we change the log to WARN?

Comment 2 Yaniv Lavi 2018-01-17 12:53:53 UTC
(In reply to Daniel Erez from comment #1)
> This behaviour is actually by design, cancelling a transfer operation
> initiates the failure flow (which clears the ImageTransfer). Thus, we output
> a failure log ("Failed to transfer disk..."), to indicate that the transfer
> indeed failed. So, the log could be either ERROR or WARN.
> 
> @Yaniv/Allon - any take on that? Should we change the log to WARN?

To be on a user initiated cancellation is should be INFO. Allon, thoughts?

Comment 3 Yaniv Lavi 2018-01-17 12:54:36 UTC
(In reply to Yaniv Lavi from comment #2)
> (In reply to Daniel Erez from comment #1)
> > This behaviour is actually by design, cancelling a transfer operation
> > initiates the failure flow (which clears the ImageTransfer). Thus, we output
> > a failure log ("Failed to transfer disk..."), to indicate that the transfer
> > indeed failed. So, the log could be either ERROR or WARN.
> > 
> > @Yaniv/Allon - any take on that? Should we change the log to WARN?
Correction:
> To me, on a user initiated cancellation, it should be INFO level. Allon, thoughts?

Comment 4 Daniel Erez 2018-01-17 13:00:42 UTC
(In reply to Yaniv Lavi from comment #3)
> (In reply to Yaniv Lavi from comment #2)
> > (In reply to Daniel Erez from comment #1)
> > > This behaviour is actually by design, cancelling a transfer operation
> > > initiates the failure flow (which clears the ImageTransfer). Thus, we output
> > > a failure log ("Failed to transfer disk..."), to indicate that the transfer
> > > indeed failed. So, the log could be either ERROR or WARN.
> > > 
> > > @Yaniv/Allon - any take on that? Should we change the log to WARN?
> Correction:
> > To me, on a user initiated cancellation, it should be INFO level. Allon, thoughts?

This flow is actually mutual to both flows (i.e. cancellation initiated by a user or due to an internal failure).

Comment 5 Allon Mureinik 2018-01-21 10:35:39 UTC
We should distinguish between a transfer failure (which is an ERROR) and a user proactively canceling the transfer (INFO) - at least in the engine.
I'm fine with them being treated the same in the lower level components if this simplifies things.

Comment 6 Tal Nisan 2018-07-30 08:43:43 UTC
Daniel, how complicated will it be to add a boolean of some sort distinguishing in the failure flows whether the cleanup is due to an error or a user initiated one and change the log accordingly?

Comment 7 Daniel Erez 2018-07-30 08:54:59 UTC
(In reply to Tal Nisan from comment #6)
> Daniel, how complicated will it be to add a boolean of some sort
> distinguishing in the failure flows whether the cleanup is due to an error
> or a user initiated one and change the log accordingly?

It's probably more difficult than that. When I looked into it last time, it required some refactoring in the command's state machine. I would keep it for re-evaluation in 4.3.

Comment 8 Sandro Bonazzola 2019-01-28 09:34:29 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 9 Avihai 2019-07-02 07:59:52 UTC
Verified on ovirt-engine 4.3.5.2-0.1.el7

Engine log showing image upload/download cancle as INFO not ERROR:
2019-07-02 10:51:03,335+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-6) [cb1c3b3f-6511-4c5f-b37f-272b0bd53e12] EVENT_ID: TRANSF
ER_IMAGE_CANCELLED(1,033), Image Upload with disk upload was cancelled.

2019-07-02 10:56:21,479+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-13) [a45924a3-8d8b-4809-b578-aca945900c43] EVENT_ID: TRANSFER_IMAGE_CANCELLED(1,033), Image Download with disk floating_disk_test was cancelled.

Same was seen in UI.

Steps to Reproduce:
1.Start upload/download disk image
2.Cancle upload/download operation

Cancel is successful and do not throw an error message in the UI/engine log.

Comment 10 Sandro Bonazzola 2019-07-30 14:08:31 UTC
This bugzilla is included in oVirt 4.3.5 release, published on July 30th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 release, it has been closed with a resolution of CURRENT RELEASE.

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


Note You need to log in before you can comment on or make changes to this bug.