Bug #17503

Host model load causes unnecessary loads on instantiation

Added by Tomer Brisker 5 months ago. Updated 5 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomer Brisker
Category:Host creation
Target version:Team Daniel - iteration 6
Difficulty: Bugzilla link:
Found in release:1.13.0 Pull request:https://github.com/theforeman/foreman/pull/4063
Story points-
Velocity based estimate-
Release1.15.0Release relationshipAuto

Description

The fix for #12634 introduced a PXELoaderSuggestion mechanism that is executed as an `after_initialize` hook. This causes any Host object instantiation to execute this suggestion mechanism, which may lead to up to 3 extra queries per host. However, this is only needed for the host creation form to populate the PXELoader field when choosing OS.


Related issues

Related to Foreman - Feature #12634: New HW Model flag pxe_loader in UI/API Closed 11/30/2015

Associated revisions

Revision 497c022b
Added by Tomer Brisker 5 months ago

Fixes #17503 - Only trigger PXELoader suggestion when needed

Previously every host instantiation triggered a PXELoader suggestion,
which led to up to 3 extra queries per host loaded. This changes so that
the suggestion is only applied when a host changes it's OS.

History

#1 Updated by The Foreman Bot 5 months ago

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

#2 Updated by Tomer Brisker 5 months ago

  • Related to Feature #12634: New HW Model flag pxe_loader in UI/API added

#3 Updated by Daniel Lobato Garcia 5 months ago

  • Target version set to Team Daniel - iteration 6

#4 Updated by Anonymous 5 months ago

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

#5 Updated by Dominic Cleal 5 months ago

  • Release set to 1.15.0

Also available in: Atom PDF