Browse Source

Allow alternative source files for /tftpboot/ipxe.efi

ipxe-bootimgs will soon include the ipxe efi variant
ipxe-snponly.efi which has no networking stack, relying instead
on the UEFI networking stack. This image is required in some UEFI
environments instead of the full ipxe.efi, so there needs to be
a mechanism for serving it by default.

This change makes this possible by setting the puppet parameter
ironic::pxe::ipxe_name_base to ipxe-snponly.

Change-Id: I3a0e85ce6d83001833c829f484baf181a677a5d9
(cherry picked from commit ca47ba7c7f)
changes/23/721523/2
Steve Baker 2 months ago
parent
commit
74e8eb2304
3 changed files with 19 additions and 5 deletions
  1. +10
    -3
      manifests/pxe.pp
  2. +7
    -0
      releasenotes/notes/ipxe_name_base-91f5a571210f171c.yaml
  3. +2
    -2
      spec/classes/ironic_pxe_spec.rb

+ 10
- 3
manifests/pxe.pp View File

@@ -51,6 +51,12 @@
# (optional) Boolean value to dtermine if ppc64le support should be enabled
# Defaults to false (no ppc64le support)
#
# [*ipxe_name_base*]
# (optional) Beginning of the source file name which is copied to
# $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS7 would result
# in the source file being /usr/share/ipxe/ipxe-snponly.efi
# Defaults to 'ipxe'
#
class ironic::pxe (
$package_ensure = 'present',
$tftp_root = '/tftpboot',
@@ -60,6 +66,7 @@ class ironic::pxe (
$syslinux_files = $::ironic::params::syslinux_files,
$tftp_bind_host = undef,
$enable_ppc64le = false,
$ipxe_name_base = 'ipxe',
) inherits ::ironic::params {

include ::ironic::deps
@@ -158,7 +165,7 @@ class ironic::pxe (
})

file { "${tftp_root_real}/undionly.kpxe":
ensure => 'present',
ensure => 'file',
seltype => 'tftpdir_t',
owner => 'ironic',
group => 'ironic',
@@ -169,12 +176,12 @@ class ironic::pxe (
}

file { "${tftp_root_real}/ipxe.efi":
ensure => 'present',
ensure => 'file',
seltype => 'tftpdir_t',
owner => 'ironic',
group => 'ironic',
mode => '0744',
source => "${::ironic::params::ipxe_rom_dir}/ipxe.efi",
source => "${::ironic::params::ipxe_rom_dir}/${ipxe_name_base}.efi",
backup => false,
require => Anchor['ironic-inspector::install::end'],
}


+ 7
- 0
releasenotes/notes/ipxe_name_base-91f5a571210f171c.yaml View File

@@ -0,0 +1,7 @@
---
features:
- |
The parameter ironic::pxe::ipxe_name_base has been added, which allows
alternative ipxe files to be copied to /tftpboot/ipxe.efi. For example,
setting this to 'ipxe-snponly' on CentOS8 would result in the source file
being /usr/share/ipxe/ipxe-snponly-x86_64.efi.

+ 2
- 2
spec/classes/ironic_pxe_spec.rb View File

@@ -106,7 +106,7 @@ describe 'ironic::pxe' do
'group' => 'ironic',
'require' => 'Anchor[ironic-inspector::install::end]',
'seltype' => 'tftpdir_t',
'ensure' => 'present',
'ensure' => 'file',
'backup' => false,
)
end
@@ -116,7 +116,7 @@ describe 'ironic::pxe' do
'group' => 'ironic',
'require' => 'Anchor[ironic-inspector::install::end]',
'seltype' => 'tftpdir_t',
'ensure' => 'present',
'ensure' => 'file',
'backup' => false,
)
end


Loading…
Cancel
Save