Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1461194 - [RFE] API to fetch list of hosts without full host details
[RFE] API to fetch list of hosts without full host details
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts (Show other bugs)
6.2.9
Unspecified Unspecified
medium Severity medium (vote)
: 6.2.12
: Unused
Assigned To: Tomer Brisker
jcallaha
: FieldEngineering, FutureFeature, PrioBumpField, PrioBumpPM, PrioBumpQA
: 1298348 (view as bug list)
Depends On:
Blocks: 1437197
  Show dependency treegraph
 
Reported: 2017-06-13 15:13 EDT by Chris Duryee
Modified: 2018-10-31 07:22 EDT (History)
12 users (show)

See Also:
Fixed In Version: foreman-1.11.0.84-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1480348 (view as bug list)
Environment:
Last Closed: 2017-09-25 14:59:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20072 None None None 2017-06-21 06:50 EDT
Red Hat Product Errata RHBA-2017:2803 normal SHIPPED_LIVE Satellite 6.2.12 bug fix update 2017-10-12 15:22:49 EDT

  None (edit)
Description Chris Duryee 2017-06-13 15:13:54 EDT
Description of problem:

A couple of users have expressed interest in a "host list only" API. This would be useful when scripting and looping over lots of hosts. If it took the same params as the existing /hosts api but returned only the host ID and hostname, that would be ideal.

There are a performance issues with the existing /hosts API call that are being addressed[1]; however even if it was lightning fast, a more minimal result set is still useful for scripting.

This is similar to Spacewalk's listActiveSystems call[2] which does not return system details. The RFE came about from users with spacewalk scripts that run much slower after porting to Katello.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1445623
[2] http://www.spacewalkproject.org/documentation/api/2.3/handlers/SystemHandler.html#listActiveSystems
Comment 1 Chris Duryee 2017-06-13 15:18:28 EDT
The listActiveSystems call takes approximately 2 sec for 2K hosts. This new API would need similar performance, at least under 10 seconds for 5K hosts.
Comment 4 Tomer Brisker 2017-06-21 06:50:06 EDT
Created redmine issue http://projects.theforeman.org/issues/20072 from this bug
Comment 5 pm-sat@redhat.com 2017-06-22 02:08:22 EDT
Upstream bug assigned to tbrisker@redhat.com
Comment 6 pm-sat@redhat.com 2017-06-22 02:08:26 EDT
Upstream bug assigned to tbrisker@redhat.com
Comment 7 pm-sat@redhat.com 2017-06-27 04:08:00 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20072 has been resolved.
Comment 14 jcallaha 2017-08-28 14:23:17 EDT
Verified in Satellite 6.2.12 Snap 1.

-bash-4.2# curl --user admin:changeme -k https://ibm-x3550m3-10.lab.eng.brq.redhat.com/api/v2/hosts?thin=true
{
  "total": 21,
  "subtotal": 21,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"id":5,"name":"base1"},{"id":13,"name":"base10"},{"id":11,"name":"base11"},{"id":20,"name":"base12"},{"id":19,"name":"base13"},{"id":12,"name":"base14"},{"id":15,"name":"base15"},{"id":16,"name":"base16"},{"id":21,"name":"base17"},{"id":18,"name":"base18"},{"id":17,"name":"base19"},{"id":4,"name":"base2"},{"id":14,"name":"base20"},{"id":3,"name":"base3"},{"id":6,"name":"base4"},{"id":2,"name":"base5"},{"id":7,"name":"base6"},{"id":8,"name":"base7"},{"id":10,"name":"base8"},{"id":9,"name":"base9"}]
}
Comment 15 Bryan Kearney 2017-09-14 10:36:25 EDT
*** Bug 1298348 has been marked as a duplicate of this bug. ***
Comment 17 errata-xmlrpc 2017-09-25 14:59:44 EDT
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/RHBA-2017:2803

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