From d99a51d17b7ae254d03225dd763f56cd90465bcb Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 21 Jul 2021 08:28:33 +0900 Subject: [PATCH] Make ipxe bootfile name configurable This is a follow up of 3864e15998b5b1eec7d2b1b4911add9bb899fdb8 and allows using a different name for ipxe bootfile. This is useful if a user needs to switch back to ipxe*.efi from ipxe-snponly*.efi for some reasons. Change-Id: I565e3ae6388812c358e86fac49b17e0cce97b9df --- manifests/pxe.pp | 29 ++++++++++++------- ...i_ipxe_bootfile_name-f2ad0596ffe90598.yaml | 6 ++++ 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/uefi_ipxe_bootfile_name-f2ad0596ffe90598.yaml diff --git a/manifests/pxe.pp b/manifests/pxe.pp index e826548c..a411f8d3 100644 --- a/manifests/pxe.pp +++ b/manifests/pxe.pp @@ -55,18 +55,25 @@ # (optional) Beginning of the source file name which is copied to # $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS8 would result # in the source file being /usr/share/ipxe/ipxe-snponly-x86_64.efi -# Defaults to 'ipxe' +# Defaults to 'ipxe-snponly' +# +# [*uefi_ipxe_bootfile_name*] +# (optional) Name of efi file used to boot servers with iPXE + UEFI. This +# should be consistent with the uefi_ipxe_bootfile_name parameter in pxe +# driver. +# Defaults to 'snponly.efi' # class ironic::pxe ( - $package_ensure = 'present', - $tftp_root = '/tftpboot', - $http_root = '/httpboot', - $http_port = '8088', - $syslinux_path = $::ironic::params::syslinux_path, - $syslinux_files = $::ironic::params::syslinux_files, - $tftp_bind_host = undef, - $enable_ppc64le = false, - $ipxe_name_base = 'ipxe-snponly', + $package_ensure = 'present', + $tftp_root = '/tftpboot', + $http_root = '/httpboot', + $http_port = '8088', + $syslinux_path = $::ironic::params::syslinux_path, + $syslinux_files = $::ironic::params::syslinux_files, + $tftp_bind_host = undef, + $enable_ppc64le = false, + $ipxe_name_base = 'ipxe-snponly', + $uefi_ipxe_bootfile_name = 'snponly.efi' ) inherits ironic::params { include ironic::deps @@ -181,7 +188,7 @@ class ironic::pxe ( require => Anchor['ironic-inspector::install::end'], } - file { "${tftp_root_real}/snponly.efi": + file { "${tftp_root_real}/${uefi_ipxe_bootfile_name}": ensure => 'file', seltype => 'tftpdir_t', owner => 'ironic', diff --git a/releasenotes/notes/uefi_ipxe_bootfile_name-f2ad0596ffe90598.yaml b/releasenotes/notes/uefi_ipxe_bootfile_name-f2ad0596ffe90598.yaml new file mode 100644 index 00000000..742b92de --- /dev/null +++ b/releasenotes/notes/uefi_ipxe_bootfile_name-f2ad0596ffe90598.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new ``ironic::pxe::uefi_ipxe_bootfile_name`` parameter has been added. + This parameter is used to determine name of the efi file used to boot nodes + with UEFI + iPXE.