Bug 1550011 - Log and present the reason for exceptions in communication with external providers.
Summary: Log and present the reason for exceptions in communication with external prov...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.2.1.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ravi Nori
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-28 09:52 UTC by Dominik Holler
Modified: 2018-04-05 09:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-05 09:39:46 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 88859 0 master MERGED engine : Log and present the reason for exceptions in communication with external providers. 2018-03-19 13:44:13 UTC
oVirt gerrit 89177 0 ovirt-engine-4.2 MERGED engine : Log and present the reason for exceptions in communication with external providers. 2018-03-20 09:14:22 UTC

Description Dominik Holler 2018-02-28 09:52:07 UTC
Description of problem:
If inside a command an exception during the communication with an external provider occurs, only "Failed with error PROVIDER_FAILURE and code 5050)" is logged by the command and transported to the user, e.g. in webamin.
More helpful would be to log and present the reason for the exception.

On implementation level, it may help if the message of the inner exception of the EngineException is would be included in the message of the EngineException.
It may be helpful if the creator of the EngineException can decide if the message of the inner exception should be included in the EngineException.


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


How reproducible:
Import a network from an external network provider which is not available.

Steps to Reproduce:
1. Import a network from an external network provider which is not available in webadmin
2.
3.

Actual results:
Log and webadmin shows:
'Error while listing external networks: PROVIDER_FAILURE'

Expected results:
Error message in log and webamdin contains 'Connection refused'

Additional info:

Comment 1 Yaniv Kaul 2018-03-15 14:04:44 UTC
Is this on track to 4.2.2? If not, please defer to 4.2.3.

Comment 2 Radim Hrazdil 2018-03-29 10:33:03 UTC
I did following steps:
1. opened import network dialog
2. selected a network from avaliable networks
3. removed this network in a different window
4. executed import of the already removed network

Operation failed with the following:
Error while executing action: Logical Network (id '7808d2b4-45ec-46a1-8d19-bb6e1f1579ac') doesn't exist.

engine.log:
2018-03-29 13:19:20,755+03 WARN  [org.ovirt.engine.core.bll.network.dc.ImportExternalNetworkCommand] (default task-30) [1c884412-3ea0-4937-9061-86ddd93fed73] Validation of action 'ImportExternalNetwork' failed for user admin@internal-authz. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__NETWORK,NETWORK_HAVING_ID_NOT_EXISTS,$NETWORK_HAVING_ID_NOT_EXISTS_ENTITY 7808d2b4-45ec-46a1-8d19-bb6e1f1579ac


That seems descriptive enough to me. 

Dominik, is this what you meant? Or could you elaborate, how to achieve Connection refused? It is not clear to me from the steps you provided.

Comment 3 Radim Hrazdil 2018-03-29 11:03:33 UTC
Version:4.2.2.5-0.1.el7

Comment 4 Dominik Holler 2018-04-03 07:45:20 UTC
Radim, I wanted that the 'which is not available' refers to the provider bu not the network.

To verify this bug, please stop the provider via
sudo systemctl stop ovirt-provider-ovn.service
and try to import a network from ovirt-provider-ovn.
This should result in an error message containing 'Connection refused'.
Thanks.

Comment 5 Radim Hrazdil 2018-04-04 09:56:01 UTC
Thanks Dominik. Verified on Version:4.2.2.5-0.1.el7.

Comment 6 Sandro Bonazzola 2018-04-05 09:39:46 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 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.