Bug 1285390 - REST error message suggests description but there is none
REST error message suggests description but there is none
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: RestAPI (Show other bugs)
4.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-4.0.0-alpha
: 4.0.0
Assigned To: Ori Liel
Lukas Svaty
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-25 09:13 EST by jniederm
Modified: 2016-08-01 08:26 EDT (History)
2 users (show)

See Also:
Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-01 08:26:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.0.0+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
stack_trace.txt (28.69 KB, text/plain)
2015-11-25 09:13 EST, jniederm
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 49308 master MERGED restapi: Use "SystemResource" to find root collections Never
oVirt gerrit 53957 master ABANDONED restapi: Ignore version prefix in "UsageFinder" 2016-03-30 11:06 EDT
oVirt gerrit 55350 master MERGED restapi: Fix missing description for bad request 2016-03-28 10:07 EDT

  None (edit)
Description jniederm 2015-11-25 09:13:47 EST
Created attachment 1098826 [details]
stack_trace.txt

Description of problem:
Error message generated as response to malformed REST API request suggests some "description". However the response doesn't contain any.

Version-Release number of selected component (if applicable):
4.0 master, commit 5e447e0

How reproducible:
100%

Steps to Reproduce:
1.
POST /ovirt-engine/api/vmpools HTTP/1.1
Host: localhost:8080
Authorization: Basic YWRtaW5AaW50ZXJuYWw6YQ==
Content-Type: application/xml

<vmpool>
    <name>pool1</name>
</vmpool>

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<usage_message>
    <message>Request syntactically incorrect. See the description below for the correct usage:</message>
</usage_message>

and error in engine log, see attachement

Expected results:
Some meaningful, descriptive error message

Additional info:
Comment 1 Juan Hernández 2015-11-27 06:00:44 EST
Note that this is more severe than just not showing the description, what actually happens is that the RSDL document is generated incorrectly, almost empty. The proposed patch fixes the generation of the RSDL, and then the description is shown correctly.
Comment 2 jniederm 2016-02-23 17:19:03 EST
Hi Juan, I can still reproduce the bug on current 4.0 master (commit 904ab61) using steps to reproduce in comment 0. Is it supposed to be fixed or not yet?
Comment 3 Juan Hernández 2016-02-24 04:38:57 EST
The original issue was fixed. But then the introduction of the support for multiple versions introduced a new regression, which has the same effect. The following patch fixes it:

  restapi: Ignore version prefix in "UsageFinder"
  https://gerrit.ovirt.org/53957
Comment 4 Red Hat Bugzilla Rules Engine 2016-02-24 04:39:02 EST
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 5 Lukas Svaty 2016-08-01 03:54:08 EDT
verified in ovirt-engine-restapi-4.0.2.1-0.1.el7ev.noarch

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>For correct usage, see: https://*hostname*/ovirt-engine/api/v4/model#services/vms/methods/add</detail>
    <reason>Request syntactically incorrect.</reason>
</fault>

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