Bug 1490763 - Incorrect link for correct usage on request failure
Summary: Incorrect link for correct usage on request failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ori Liel
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-12 08:02 UTC by Gonza
Modified: 2018-04-05 09:38 UTC (History)
4 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 89107 0 master MERGED restapi - Incorrect Usage Message 2018-03-19 08:37:50 UTC
oVirt gerrit 89169 0 ovirt-engine-4.2 MERGED restapi - Incorrect Usage Message 2018-03-19 14:00:11 UTC

Description Gonza 2017-09-12 08:02:01 UTC
Description of problem:
When running a bad request via REST the response returns a message with a link for correct usage which is not appropriate.

# curl -vvvv -X POST -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/ada1d13a-4f8e-4c58-ae17-eb3dbbe6482c/enabledfeatures \
-d "bad bad not good"
...
< HTTP/1.1 400 Bad Request
< Date: Tue, 12 Sep 2017 07:34:17 GMT
< Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips
< Content-Type: application/json
< Correlation-Id: 1794bd2a-e508-4df2-83e1-237fe82cbfa7
< Connection: close
< Transfer-Encoding: chunked
< 
{
  "detail" : "For correct usage, see: https://engine.com/ovirt-engine/api/v4/model#services/cluster-enabled-features/methods/add",
  "reason" : "Request syntactically incorrect."
* Closing connection 0
}%

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170906185835.gitcee3e58.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. Run a bad request against the engine
2. Check results detail for correct usage link

Actual results:
{
  "detail" : "For correct usage, see: https://engine.com/ovirt-engine/api/v4/model#services/cluster-enabled-features/methods/add",
  "reason" : "Request syntactically incorrect."
* Closing connection 0
}

Expected results:
{
  "detail" : "For correct usage, see: https://engine.com/ovirt-engine/api/v4/model#services/cluster_enabled_features/methods/add",
  "reason" : "Request syntactically incorrect."
* Closing connection 0
}

Comment 1 Ori Liel 2017-11-01 11:33:28 UTC
Was probably fixed by introduction of the API explorer, need to verify

Comment 2 RHV bug bot 2018-01-05 16:57:57 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[No external trackers attached]

For more info please contact: infra

Comment 3 Martin Perina 2018-01-05 19:08:11 UTC
Moving to ON_QA as this has most probably been fixed by introduction oVirt API Explorer

Comment 4 Gonza 2018-01-29 15:49:16 UTC
Tried with:
ovirt-engine-4.2.1.1-0.1.el7.noarch

Link has changed but still not correct
"For correct usage, see: https://engine.com/ovirt-engine/apidoc#services/cluster-enabled-features/methods/add"

Comment 5 Red Hat Bugzilla Rules Engine 2018-01-29 15:49:23 UTC
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 6 Yaniv Kaul 2018-03-15 13:48:05 UTC
Ori, is this on track to 4.2.2? Otherwise, please defer.

Comment 7 Ori Liel 2018-03-19 07:47:47 UTC
Yes, this will make 4.2.2, I've posted a patch and will now mark verified +1 and merge 

https://gerrit.ovirt.org/#/c/89107/

Comment 8 Gonza 2018-03-26 10:46:20 UTC
Verified with:
ovirt-engine-4.2.2.4-0.1.el7.noarch

Link still not correct:
"For correct usage, see: https://system-ge-4.rhev.lab.eng.brq.redhat.com/ovirt-engine/apidoc#services/cluster-enabled-features/methods/add"

Comment 9 Martin Perina 2018-03-28 08:09:34 UTC
The fix is not included in that build, please reverify with ovirt-engine-4.2.2.5-0.1.el7.noarch.rpm

Comment 10 Gonza 2018-04-03 08:00:29 UTC
Verified with:
ovirt-engine-4.2.2.6-0.1.el7.noarch

Link is now correct.
"For correct usage, see: https://jenkins-vm-12.lab.eng.tlv2.redhat.com/ovirt-engine/apidoc#services/cluster_enabled_features/methods/add"

Comment 11 Sandro Bonazzola 2018-04-05 09:38:09 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.