Bug 1217975

Summary: [oVirt][provider] inadequate test failure output
Product: [oVirt] ovirt-engine Reporter: Eliraz Levi <elevi>
Component: Frontend.WebAdminAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: movciari
Severity: low Docs Contact:
Priority: unspecified    
Version: ---CC: amureini, bugs, danken, ecohen, gklein, lsurette, masayag, mgoldboi, oourfali, pstehlik, rbalakri, yeylon
Target Milestone: ovirt-3.6.0-rcFlags: rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: 3.6.0-4_alpha3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-13 15:44:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eliraz Levi 2015-05-03 15:08:50 UTC
Description of problem:
when the provider test fails, the output info is
webadmin: Failed to communicate with the external provider.

engine's log:
2015-05-03 18:00:53,697 ERROR [org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand] (http--0_0_0_0_0_0_0_0-8080-1) [4f30f327] Command 'org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand' failed: VdcBLLException: (Failed with error PROVIDER_FAILURE and code 5050)


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


How reproducible: always


Steps to Reproduce:
1.try to test external host with bad credentials for example.
2.
3.

Actual results: inadequate info explaining why the test had failed.


Expected results: when examining the exception being thrown, more information can be gathered.
for example: in the bad credentials case:
the exception value is: com.woorea.openstack.base.client.OpenStackResponseException: Unauthorized


Additional info:

Comment 1 Eli Mesika 2015-06-17 21:03:45 UTC
After investigation :

The failure reason text 
(Failed to communicate with the external provider.)is defined in the key PROVIDER_FAILURE in the following files 

backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties

frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties

frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties


That means that VDSM passes this key on any OpenStack provider failure 
In order to report on more specific failures we will have the support on the VDSM side that will explore the failure and pass additional keys (for example for authentication failure as described above ...)

Oved, IMO if we need to do that then we should open a BZ on VDSM and make this one dependent on the VDSM BZ

Comment 2 Oved Ourfali 2015-06-18 04:32:49 UTC
Test connection goes through the openstack client, and not through vdsm. 

Putting needinfo on Moti to share thoughts.

Comment 3 Moti Asayag 2015-06-18 05:35:57 UTC
(In reply to Oved Ourfali from comment #2)
> Test connection goes through the openstack client, and not through vdsm. 
> 
> Putting needinfo on Moti to share thoughts.

Correct. The patch specifically deals with testing connectivity from the engine to the openstack server, so if connection cannot be established, a specific message should be report instead of the internal server error.

The only reason it resides on VdsmErrors.properties is due to the fact that this is the resource being used by the webadmin to retrieve error messages.

Comment 4 Pavel Stehlik 2016-01-13 15:44:50 UTC
Closing old bugs. In case still happens, pls reopen.