Bug 1515252 - API calls with invalid job id return wrong response
Summary: API calls with invalid job id return wrong response
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: web-admin-tendrl-api
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.4.0
Assignee: Shirshendu Mukherjee
QA Contact: sds-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1503134
TreeView+ depends on / blocked
 
Reported: 2017-11-20 12:48 UTC by Filip Balák
Modified: 2018-09-04 06:59 UTC (History)
4 users (show)

Fixed In Version: tendrl-ansible-1.6.1-2.el7rhgs.noarch.rpm, tendrl-api-1.6.1-1.el7rhgs.noarch.rpm, tendrl-commons-1.6.1-1.el7rhgs.noarch.rpm, tendrl-monitoring-integration-1.6.1-1.el7rhgs.noarch.rpm, tendrl-node-agent-1.6.1-1.el7, tendrl-ui-1.6.1-1.el7rhgs.noarch.rpm,
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 06:58:45 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Tendrl api issues 381 0 None None None 2018-03-07 05:47:15 UTC
Red Hat Product Errata RHSA-2018:2616 0 None None None 2018-09-04 06:59:57 UTC

Description Filip Balák 2017-11-20 12:48:52 UTC
Description of problem:
API calls related to getting information about non-existent jobs (invalid job id) are returning `200 OK` statuses.

Version-Release number of selected component (if applicable):
tendrl-selinux-1.5.3-2.el7rhgs.noarch
tendrl-commons-1.5.4-3.el7rhgs.noarch
tendrl-api-httpd-1.5.4-2.el7rhgs.noarch
tendrl-grafana-selinux-1.5.3-2.el7rhgs.noarch
tendrl-ansible-1.5.4-1.el7rhgs.noarch
tendrl-node-agent-1.5.4-3.el7rhgs.noarch
tendrl-ui-1.5.4-3.el7rhgs.noarch
tendrl-grafana-plugins-1.5.4-4.el7rhgs.noarch
tendrl-notifier-1.5.4-2.el7rhgs.noarch
tendrl-api-1.5.4-2.el7rhgs.noarch
tendrl-monitoring-integration-1.5.4-4.el7rhgs.noarch

How reproducible:
100%

Steps to Reproduce:
1. Call following API calls with valid access token:
curl -XGET -H "Authorization: Bearer access_token" http://127.0.0.1/api/1.0/jobs/invalid
curl -XGET -H "Authorization: Bearer access_token" http://127.0.0.1/api/1.0/jobs/invalid/messages
curl -XGET -H "Authorization: Bearer access_token" http://127.0.0.1/api/1.0/jobs/invalid/output
curl -XGET -H "Authorization: Bearer access_token" http://127.0.0.1/api/1.0/jobs/invalid

Actual results:
All calls above return empty list or empty dictionary with response status `200 OK`. Only /api/1.0/jobs/invalid/status returns `404 Not Found`.

Expected results:
All calls above should return status `404 Not Found`.

Additional info:

Comment 4 Filip Balák 2018-03-13 13:29:28 UTC
Looks ok. --> VERIFIED

Tested with:
tendrl-ansible-1.6.1-2.el7rhgs.noarch
tendrl-api-1.6.1-1.el7rhgs.noarch
tendrl-api-httpd-1.6.1-1.el7rhgs.noarch
tendrl-commons-1.6.1-1.el7rhgs.noarch
tendrl-grafana-plugins-1.6.1-1.el7rhgs.noarch
tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch
tendrl-monitoring-integration-1.6.1-1.el7rhgs.noarch
tendrl-node-agent-1.6.1-1.el7rhgs.noarch
tendrl-notifier-1.6.0-1.el7rhgs.noarch
tendrl-selinux-1.5.4-2.el7rhgs.noarch
tendrl-ui-1.6.1-1.el7rhgs.noarch

Comment 6 errata-xmlrpc 2018-09-04 06:58:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2616


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