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

Bug 1571648

Summary: Detailed message in Error SDK
Product: [oVirt] ovirt-engine-sdk-java Reporter: francisco.garcia
Component: GeneralAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, juan.hernandez, lsvaty
Target Milestone: ovirt-4.2.4Flags: rule-engine: ovirt-4.2+
Target Release: 4.2.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: java-ovirt-engine-sdk4-4.2.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-26 08:34:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Reports RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1582077    
Attachments:
Description Flags
Sample instance Error SDK in debug Eclipse when I try create a Vm with a duplicated name in RHVM none

Description francisco.garcia 2018-04-25 09:36:00 UTC
Created attachment 1426505 [details]
Sample instance Error SDK in debug Eclipse when I try create a Vm with a duplicated name in RHVM

Description of problem:
The lack information that contains the Error's message when it is thrown. How can I get more information about that error?

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


How reproducible:
Any exception thrown by sdk is valid.

For example, a common error easy to reproduce is try create a Vm with same name that a Vm has already been registered.


Steps to Reproduce:
1. Create a Vm with name "vm1"
2. Try create a Vm with name "vm1" using java-sdk.

Actual results:
As we see in the image attached, the fields of the error are ambiguous, and they don't reflect the error specifically. Basically the error show the message: 
"HTTP response code is "409". HTTP response message is "Conflict"."

However, if we look at the RHVM's log in file: /var/log/ovirt-engine/engine.log, the message reflect this: 
2018-04-24 17:39:53,514+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-22) [] Operation Failed: [Import VM failed - VM Name already exist in the Data Center. Please rename the VM in the Data Center first
  
Expected results:
A message error as the server would be good, to obtain more information.

Comment 1 Radim Hrazdil 2018-05-30 06:31:58 UTC
Verified that attempt to create a vm with an already existing name fails with detail message: "[Cannot add VM. The VM name is already in use, please choose a unique name and try again.]".

java-ovirt-engine-sdk4-4.2.3-1.el7ev.noarch

Comment 2 Sandro Bonazzola 2018-06-26 08:34:26 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

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