Bug #17503
Host model load causes unnecessary loads on instantiation
Pull request:
Fixed in Releases:
Found in Releases:
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
Associated revisions
History
#1
Updated by The Foreman Bot about 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/theforeman/foreman/pull/4063 added
#2
Updated by Tomer Brisker about 4 years ago
- Related to Feature #12634: New HW Model flag pxe_loader in UI/API added
#3
Updated by Daniel Lobato Garcia about 4 years ago
- Target version set to 1.4.3
#4
Updated by Anonymous about 4 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 497c022bf4f77819f1a9f781a762f212d82aad30.
#5
Updated by Dominic Cleal about 4 years ago
- Legacy Backlogs Release (now unused) set to 209
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.