Feature #19115
openAdd setting to define which PXE loaders are enabled
Description
If I deleted the "PXEGrub default local boot" template and now want to cancel a pending build I get the following error message:
Error: Failed to cancel pending build for xxxxxx with the following errors: Unable to render 'PXEGrub default local boot' template: ERF42-4689 [Foreman::Exception]: Template 'PXEGrub default local boot' was not found
Given the fact that I did not assign any PXEGrub template to the OS of this particular host this is kind of unexpected at the first sight.
After some analysis it turned out that obviously foreman needs to create local boot files for all boot loaders as you cant assign a specific one to a host.
now my suggestion is to create a global foreman setting that defines which boot loaders are being used in the environment foreman is in. this would allow at least 2 things:
- only show the enabled pxe boot loaders in the drop down under "new host > operating system > pxe loader"
- only render the local boot templates for enabled pxe boot loaders
- maybe narrow down boot loader related tasks to only enabled once in other places I haven’t seen yet.
Updated by Dominic Cleal about 7 years ago
- Tracker changed from Bug to Feature
- Subject changed from cancel a build not possible when defaul template no longer exists to Add setting to define which PXE loaders are enabled
- Category set to Templates
This error should no longer be possible since #18639, which locks the template and prevents it from being deleted.
I've changed the ticket to track the request to restrict which PXE loaders are managed, but if that's no longer important either, please close it.
Updated by Lukas Zapletal about 7 years ago
How you managed to delete "PXEGrub default local boot" template? It is supposed to be locked, isn't it?
Anyway, what you propose is maybe too complicated. How about just change the code that delivers local boot templates so it skips all missing ones instead of raising an error? That should do it.
Updated by Dominic Cleal about 7 years ago
Lukas Zapletal wrote:
How you managed to delete "PXEGrub default local boot" template? It is supposed to be locked, isn't it?
No templates are meant to be locked in this release, only since the ticket above (in develop only).
Updated by Dominic Schlegel about 7 years ago
How about just change the code that delivers local boot templates so it skips all missing ones instead of raising an error?
This sounds like a good idea. Although I still believe the user should be able to decide which boot loaders should be available/managable.