Bug 1584341

Summary: Incorrect API endpoint GET /api/hosts/:host_id/tracer
Product: Red Hat Satellite Reporter: Nagoor Shaik <nshaik>
Component: katello-tracerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Silvie Chlupova <schlupov>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: ajambhul, andrew.schofield, pcreech, schlupov
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
URL: https://projects.theforeman.org/issues/23737
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.7.0.rc1.2-0.1.rc1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:05:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nagoor Shaik 2018-05-30 17:49:49 UTC
Description of problem:
Incorrect API endpoint GET /api/hosts/:host_id/tracer

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.3.1

How reproducible:
100%

Steps to Reproduce:
Try to retrieve the tracer information of host using API fails 

 # curl -k -s -u admin https://sat63.example.com/api/hosts/<HOST_ID>/tracer | json_reformat

Actual results:

Fails as there is no end point /tracer in the API call, due to a typo in /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64.2/app/controllers/katello/api/v2/host_tracer_controller.rb


Expected results:

API endpoint should exist and should work as expected 

Additional info:

Comment 3 Nagoor Shaik 2018-06-01 05:18:53 UTC
WORKAROUND in Satellite 6.3.1

 # sed -i.bak 's/tracer/traces/' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/controllers/katello/api/v2/host_tracer_controller.rb
 
 # sed -i.bak 's/servises/services/' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/controllers/katello/api/v2/host_tracer_controller.rb

 # foreman-rake apipie:cache

Once done, verify the API Doc 

 https://satellite.example.com/apidoc

To retrieve the Traces information for a Host, run below

 # curl -k -s -u admin https://sat63.example.com/api/hosts/<HOST_ID>/traces

Comment 8 Bryan Kearney 2018-10-16 19:05:52 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:2927