Bug #20622

Puppet reports recalculate all statuses

Added by Lukas Zapletal 3 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Lukas Zapletal
Category:Importers
Target version:-
Difficulty: Bugzilla link:1482204
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4749
Story points-
Velocity based estimate-
Release1.15.4Release relationshipAuto

Description

It appears that puppet reports cause all statuses to be updated:

https://github.com/theforeman/foreman/blob/develop/app/services/report_importer.rb#L42

On a heavily loaded system this could mean this is being called 100s of times per second. This is a fairly slow operation to be doing when not necessary.

Puppet reports should only refresh statuses that are relevant to them.

Associated revisions

Revision be670616
Added by Lukas Zapletal 3 months ago

Fixes #20622 - puppet import does not refresh all statuses

Revision 20adcd0d
Added by Lukas Zapletal 2 months ago

Fixes #20622 - puppet import does not refresh all statuses

(cherry picked from commit be6706162e9705611827aa0a8e875a9f3175d2e9)

History

#1 Updated by Marek Hulán 3 months ago

I agree, Host::Managed#refresh_statuses is being used from many places (report import, openscap report import and I can imagine other plugins too). Maybe it should accept set of statuses that were changed and should be refreshed. Btw Justin was looking into this recently too.

#2 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/4749 added

#3 Updated by Lukas Zapletal 3 months ago

  • Release set to 1.15.4

Requesting 1.15 as well.

#4 Updated by Lukas Zapletal 3 months ago

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

Also available in: Atom PDF