Bug #1842

Getting hostgroups via the API takes an eternity

Added by Nacho Barrientos 9 months ago. Updated 9 months ago.

Status:Closed Start:08/29/2012
Priority:Normal Due date:
Assigned to:Ohad Levy % Done:

100%

Category:API
Target version:1.1
Backlog:No Difficulity:
Votes: 0

Description

Query URL: https://foreman/hostgroups?format=json&page=1

Short log:

Started GET "/hostgroups?format=json" for 137.138.218.221 at Wed Aug 29 11:56:32 +0200 2012
Processing by HostgroupsController#index as JSON
Completed 200 OK in 35368ms (Views: 33777.7ms | ActiveRecord: 1591.4ms)

Attached is a full log.

production-clean.log (503.4 KB) Nacho Barrientos, 08/29/2012 09:51 am

Associated revisions

Revision 2aabb4567368da4f64912ba170e1ae005812061c
Added by Ohad Levy 9 months ago

fixes #1842 - Getting hostgroups via the API takes an eternity.

This changes a bit the API resonspe as well, as it makes little sense in a rest
context to return full nested objects (when the child objects can be very large).

therefore, instead of environments and puppetclasses (and eventually smart vars)
the environment and classes are now reference by id.

History

Updated by Ohad Levy 9 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Updated by Ohad Levy 9 months ago

  • Assigned to set to Ohad Levy
  • Target version set to 1.1

Also available in: Atom PDF