Bug #6856

Importing single environments not faster than importing all

Added by Florian Sachs over 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Joseph Magen
Category:Importers
Target version:Sprint 29
Difficulty: Bugzilla link:
Found in release:1.5.1 Pull request:https://github.com/theforeman/foreman/pull/1789
Story points-
Velocity based estimate-
Release1.6.1Release relationshipAuto

Description

I am building our new production environment based on Foreman 1.4, puppet 2.6 on a RHEL6 machine. Right now, there are 11 environments on the puppet machine (smart_proxy 1) Based on what we have now in our production (Foreman 1.1, puppet 3.0) systems, I expect us to have about 40 environments.

On the old system, a "Import all environments" runs for about 8 (!!!) minutes. I was very happy, when I discovered the new possibility to import only a specfific environment via the API, which could speed up our development turn around time significally.

The problem is, that importing a single environment takes as long as importing all environments:

Import the Environment Number 22 takes 1:22 ::

Started POST "/api/smart_proxies/1/environments/22/import_puppetclasses" for 10.x.x.x at 2014-07-31 10:18:33 +0200
Processing by Api::V2::EnvironmentsController#import_puppetclasses as JSON
  Parameters: {"apiv"=>"v2", "smart_proxy_id"=>"1", "id"=>"22", "environment"=>{}}

Import all environments take 1:18 ::

Started POST "/api/smart_proxies/1/import_puppetclasses" for 10.x.x.x at 2014-07-31 10:20:20 +0200
Processing by Api::V2::SmartProxiesController#import_puppetclasses as JSON
  Parameters: {"apiv"=>"v2", "id"=>"1", "smart_proxy"=>{}}

Shouldn't importing only one environment be significally faster than importing all environments?

regards,
florian

Associated revisions

Revision 4c59b8da
Added by Joseph Magen about 3 years ago

fixes #6856 - API v2 - more efficient import puppetclasses for single environment

Revision ecbcb0b6
Added by Joseph Magen about 3 years ago

fixes #6856 - API v2 - more efficient import puppetclasses for single environment

(cherry picked from commit 4c59b8daccf3534fa89a31076b3e2ca4ae7fdcee)

History

#1 Updated by Florian Sachs over 3 years ago

Just reread this report and noticed some incorrect versions:
Foreman Version is 1.5.1
Puppet is 3.6.1

#2 Updated by Joseph Magen about 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Joseph Magen

#3 Updated by The Foreman Bot about 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to Sprint 29
  • Pull request https://github.com/theforeman/foreman/pull/1789 added

#4 Updated by Joseph Magen about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal about 3 years ago

  • Release set to 1.6.1

Also available in: Atom PDF