Project

General

Profile

Feature #12634

New HW Model flag pxe_loader in UI/API

Added by Lukas Zapletal over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Category:
Orchestration
Target version:

Description

Hardware model will be enhanced with two new flags: PXE template specifies
PXE template kind and variant pair to use. Until today, this was hardcoded to
PXELinux or PXEGrub by selected operating system. Optionally, template variant
flag from OS could be simply dropped because PXE template implies variant to
use and there are no variants which share the same configuration syntax (this
is an open item).

Orchestration TFTP code must be modified to use multiple "KIND LOADER default
local boot" and "KIND LOADER global default" templates. Local and global boot
templates must be added for Grub2 new kind. Naming convention will be:

  • PXELinux BIOS default local boot
  • PXELinux UEFI default local boot
  • PXEGrub BIOS default local boot
  • PXEGrub UEFI default local boot
  • etc. (the same for global default templates)

But only kind/variant is not enough, users need to select BIOS or UEFI booting
method. This is where Loader flag comes in - selection of three constants:
BIOS, UEFI and SecureBoot UEFI. The first two are obvious causing selection of
the correct DHCP filename when deploying TFTP configuration, the third one
select "shim.efi" chain loading capability for secure booting.

Hardware model fact importing will be enhanced - it will be possible to import
the loader flag from an extra custom fact (defined via global settings).


Related issues

Related to Foreman - Tracker #431: [TRACKER] UEFI PXE supportResolved

Related to Foreman - Bug #6539: When provisioning a new host, missing templates error is not descriptiveClosed2014-07-09
Related to Foreman - Bug #16093: DHCP deletion is scheduled twice on MAC changeNew2016-08-12
Related to Foreman - Feature #12434: Allow override of filename options in DHCP host entryRejected2015-11-10
Related to Foreman - Bug #16318: PXE templates do not work in safemodeClosed2016-08-26
Related to Foreman - Bug #16475: Provisioning fails when proxy is not updatedRejected2016-09-07
Related to Foreman - Bug #16532: Selecting architecture in hostgroup doesn't update operating systemClosed2016-09-13
Related to Foreman - Bug #16819: TFTP Rebuild failed for hostClosed2016-10-06
Related to Foreman - Feature #17297: GRUB 2 PXE loader entries for Debian OS familyClosed2016-11-09
Related to Foreman - Bug #17503: Host model load causes unnecessary loads on instantiationClosed2016-11-28
Related to Foreman - Bug #18381: PXE loader attribute does not work with host group inheritanceClosed2017-02-02

Associated revisions

Revision 4cbf879e (diff)
Added by Lukas Zapletal almost 4 years ago

Fixes #12634 - New HW Model flag pxe_loader

Implementation of

https://github.com/theforeman/rfcs/blob/master/text/0001-PXE-Booting-UEFI.md

In short, new host/hostgroup flag PXE loader is added to specify TFTP
DHCP filename and Foreman now orchestrates all PXE-capable templates
deployment (e.g. PXELinux, Grub1, Grub2 if associated to an OS).

Revision cd4c8cdc (diff)
Added by Lukas Zapletal almost 4 years ago

Refs #12634 - added Grub templates for UEFI (#291)

Revision 5df816dc (diff)
Added by Dominic Cleal almost 4 years ago

refs #12634 - remove blank i18n string, match capitalisation

History

#1 Updated by Lukas Zapletal over 4 years ago

#2 Updated by Lukas Zapletal over 4 years ago

  • Subject changed from Changes in orchestration code to support both PXELinux and Grub2 to Changes in orchestration code to support multiple kinds

We need to actually support up to three kinds: PXELinux, Grub1, Grub2 for one OS.

#3 Updated by Mathieu Parent over 4 years ago

Lukas Zapletal wrote:

We need to actually support up to three kinds: PXELinux, Grub1, Grub2 for one OS.

PXELinux and Grub2 exists as BIOS (Legacy) and UEFI. Is this 5 kinds or 3 kinds x 2 flavors?

#4 Updated by Lukas Zapletal over 4 years ago

PXELinux and Grub2 exists as BIOS (Legacy) and UEFI. Is this 5 kinds or 3 kinds x 2 flavors?

The latter, we aim to support both BIOS and EFI systems with either PXELinux and Grub (becaue of RHEL6 support) or PXELinux and Grub2. The goal is to deploy PXE files simultaneously so both systems can be booted up.

#5 Updated by Lukas Zapletal over 4 years ago

I mean, Foreman will be able to deploy all three at once, but only two of the three will be likely used for one deployment. Grub1 is legacy, the PXE configuration will be present, but DHCP will hand over usually PXELinux and/or Grub2 on modern systems (RHEL7+).

#6 Updated by Lukas Zapletal over 4 years ago

  • Subject changed from Changes in orchestration code to support multiple kinds to New host/hostgroup flags pxe_template and loader

Host and hostgroups must be enhanced with two new flags: PXE template specifies PXE template kind and variant pair to use. Until today, this was hardcoded to PXELinux or PXEGrub by selected operating system. Optionally, template variant flag from OS could be simply dropped because PXE template implies variant to use and there are no variants which share the same configuration syntax (this is an open item).

But only kind/variant is not enough, users need to select BIOS or UEFI booting method. This is where Loader flag comes in - selection of three constants: BIOS, UEFI and SecureBoot UEFI. The first two are obvious causing selection of the correct DHCP filename when deploying TFTP configuration, the third one select "shim.efi" chain loading capability for secure booting.

Similarly to root password, a global setting could be provided for one or both flags for missing values (open item).

#7 Updated by Lukas Zapletal over 4 years ago

  • Description updated (diff)

#8 Updated by Lukas Zapletal over 4 years ago

  • Description updated (diff)

#9 Updated by Mathieu Parent over 4 years ago

Lukas Zapletal wrote:
[...]

But only kind/variant is not enough, users need to select BIOS or UEFI booting method. This is where Loader flag comes in - selection of three constants: BIOS, UEFI and SecureBoot UEFI. The first two are obvious causing selection of the correct DHCP filename when deploying TFTP configuration, the third one select "shim.efi" chain loading capability for secure booting.

I'm not sure "booting method" is needed. At least, BIOS or UEFI can be differentiated from DHCP options. See "if option arch" at <https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-netboot-pxe-config-efi.html&gt;.

#10 Updated by Lukas Zapletal about 4 years ago

  • Related to Bug #6539: When provisioning a new host, missing templates error is not descriptive added

#11 Updated by Lukas Zapletal about 4 years ago

  • Subject changed from New host/hostgroup flags pxe_template and loader to New HW Model flags pxe_template and loader
  • Description updated (diff)

#12 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3679 added

#13 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/theforeman/community-templates/pull/291 added

#14 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/292 added

#15 Updated by Daniel Lobato Garcia about 4 years ago

  • Target version set to 1.7.1

#16 Updated by Daniel Lobato Garcia about 4 years ago

  • Target version changed from 1.7.1 to 117

#17 Updated by Lukas Zapletal about 4 years ago

  • Status changed from Ready For Testing to Duplicate
  • Pull request deleted (https://github.com/theforeman/foreman_discovery/pull/292, https://github.com/theforeman/community-templates/pull/291, https://github.com/theforeman/foreman/pull/3679)

This ticket is actually part of #431.

#18 Updated by Lukas Zapletal about 4 years ago

  • Status changed from Duplicate to Assigned
  • Priority changed from Normal to High
  • Target version changed from 117 to 1.6.2
  • Pull request https://github.com/theforeman/foreman/pull/3679 added

Sorry for the noise, I misassigned the PR to the TRACKER issue.

#19 Updated by The Foreman Bot about 4 years ago

  • Status changed from Assigned to Ready For Testing

#20 Updated by Lukas Zapletal about 4 years ago

  • Subject changed from New HW Model flags pxe_template and loader to New HW Model flag pxe_loader in UI/API

#21 Updated by Lukas Zapletal almost 4 years ago

  • Related to Bug #16093: DHCP deletion is scheduled twice on MAC change added

#22 Updated by The Foreman Bot almost 4 years ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/292 added

#23 Updated by The Foreman Bot almost 4 years ago

  • Pull request https://github.com/theforeman/community-templates/pull/291 added

#24 Updated by Lukas Zapletal almost 4 years ago

  • Related to Feature #12434: Allow override of filename options in DHCP host entry added

#25 Updated by Jeff Sparrow almost 4 years ago

Lukas Zapletal wrote:

We need to actually support up to three kinds: PXELinux, Grub1, Grub2 for one OS.

Would be nice if there was a custom option added to this so people who want to bypass pxelinux, can. We do not use pxelinux, we load undionly (or whatever we need based on the host, undionly.pxe/kpxe/kkpxe, ipxe.lkrn, etc) and then chain right into iPXE. If I understand correctly, even with this change we will still end up manually editing foreman source code to suit our needs.

What about a custom option that accepts a string so people can load their own pxe images?

#26 Updated by Lukas Zapletal almost 4 years ago

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

#27 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 160

#28 Updated by Lukas Zapletal almost 4 years ago

We currently implemented that as a fixed list with "None" option.

What about a custom option that accepts a string so people can load their own pxe images?

I'd rather see a patch that will allow loading one or more custom entries from foreman.yaml file (name and filename pairs). Free form is little bit dangerous (e.g. security considerations etc). Feel free to provide a patch, should be easy to do.

#29 Updated by The Foreman Bot almost 4 years ago

  • Pull request https://github.com/theforeman/foreman/pull/3778 added

#30 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #16318: PXE templates do not work in safemode added

#31 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #16475: Provisioning fails when proxy is not updated added

#32 Updated by Ivan Necas almost 4 years ago

  • Related to Bug #16532: Selecting architecture in hostgroup doesn't update operating system added

#33 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #16819: TFTP Rebuild failed for host added

#34 Updated by Dominic Cleal almost 4 years ago

  • Related to Feature #17297: GRUB 2 PXE loader entries for Debian OS family added

#35 Updated by Tomer Brisker over 3 years ago

  • Related to Bug #17503: Host model load causes unnecessary loads on instantiation added

#36 Updated by Marek Hulán over 3 years ago

  • Related to Bug #18381: PXE loader attribute does not work with host group inheritance added

Also available in: Atom PDF