Merge "Add support for boot_retry_timeout and boot_retry_check_interval"
This commit is contained in:
commit
b70efb17de
@ -81,20 +81,30 @@
|
||||
# (optional) Boolean value to dtermine if ppc64le support should be enabled
|
||||
# Defaults to false (no ppc64le support)
|
||||
#
|
||||
# [*boot_retry_timeout*]
|
||||
# (optional) Timeout (in seconds) after which PXE boot should be retried.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*boot_retry_check_interval*]
|
||||
# (optional) How often (in seconds) to check for PXE boot status.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class ironic::drivers::pxe (
|
||||
$ipxe_enabled = false,
|
||||
$pxe_append_params = $::os_service_default,
|
||||
$pxe_bootfile_name = undef,
|
||||
$pxe_config_template = undef,
|
||||
$tftp_server = $::os_service_default,
|
||||
$tftp_root = '/tftpboot',
|
||||
$images_path = $::os_service_default,
|
||||
$tftp_master_path = '/tftpboot/master_images',
|
||||
$instance_master_path = $::os_service_default,
|
||||
$uefi_pxe_bootfile_name = $::os_service_default,
|
||||
$uefi_pxe_config_template = $::os_service_default,
|
||||
$ipxe_timeout = $::os_service_default,
|
||||
$enable_ppc64le = false,
|
||||
$ipxe_enabled = false,
|
||||
$pxe_append_params = $::os_service_default,
|
||||
$pxe_bootfile_name = undef,
|
||||
$pxe_config_template = undef,
|
||||
$tftp_server = $::os_service_default,
|
||||
$tftp_root = '/tftpboot',
|
||||
$images_path = $::os_service_default,
|
||||
$tftp_master_path = '/tftpboot/master_images',
|
||||
$instance_master_path = $::os_service_default,
|
||||
$uefi_pxe_bootfile_name = $::os_service_default,
|
||||
$uefi_pxe_config_template = $::os_service_default,
|
||||
$ipxe_timeout = $::os_service_default,
|
||||
$enable_ppc64le = false,
|
||||
$boot_retry_timeout = $::os_service_default,
|
||||
$boot_retry_check_interval = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::ironic::deps
|
||||
@ -112,18 +122,20 @@ class ironic::drivers::pxe (
|
||||
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'pxe/ipxe_enabled': value => $ipxe_enabled;
|
||||
'pxe/pxe_append_params': value => $pxe_append_params;
|
||||
'pxe/pxe_bootfile_name': value => $pxe_bootfile_name_real;
|
||||
'pxe/pxe_config_template': value => $pxe_config_template_real;
|
||||
'pxe/tftp_server': value => $tftp_server;
|
||||
'pxe/tftp_root': value => $tftp_root_real;
|
||||
'pxe/images_path': value => $images_path;
|
||||
'pxe/tftp_master_path': value => $tftp_master_path;
|
||||
'pxe/instance_master_path': value => $instance_master_path;
|
||||
'pxe/uefi_pxe_bootfile_name': value => $uefi_pxe_bootfile_name;
|
||||
'pxe/uefi_pxe_config_template': value => $uefi_pxe_config_template;
|
||||
'pxe/ipxe_timeout': value => $ipxe_timeout_real;
|
||||
'pxe/ipxe_enabled': value => $ipxe_enabled;
|
||||
'pxe/pxe_append_params': value => $pxe_append_params;
|
||||
'pxe/pxe_bootfile_name': value => $pxe_bootfile_name_real;
|
||||
'pxe/pxe_config_template': value => $pxe_config_template_real;
|
||||
'pxe/tftp_server': value => $tftp_server;
|
||||
'pxe/tftp_root': value => $tftp_root_real;
|
||||
'pxe/images_path': value => $images_path;
|
||||
'pxe/tftp_master_path': value => $tftp_master_path;
|
||||
'pxe/instance_master_path': value => $instance_master_path;
|
||||
'pxe/uefi_pxe_bootfile_name': value => $uefi_pxe_bootfile_name;
|
||||
'pxe/uefi_pxe_config_template': value => $uefi_pxe_config_template;
|
||||
'pxe/ipxe_timeout': value => $ipxe_timeout_real;
|
||||
'pxe/boot_retry_timeout': value => $boot_retry_timeout;
|
||||
'pxe/boot_retry_check_interval': value => $boot_retry_check_interval;
|
||||
}
|
||||
|
||||
if $enable_ppc64le {
|
||||
|
5
releasenotes/notes/boot-retry-bdcb7142f082d193.yaml
Normal file
5
releasenotes/notes/boot-retry-bdcb7142f082d193.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds support for ``boot_retry_timeout`` and ``boot_retry_check_interval``
|
||||
in ``ironic::drivers::pxe``.
|
@ -91,18 +91,20 @@ describe 'ironic::drivers::pxe' do
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:pxe_append_params => 'foo',
|
||||
:pxe_config_template => 'bar',
|
||||
:tftp_server => '192.168.0.1',
|
||||
:tftp_root => '/mnt/ftp',
|
||||
:images_path => '/mnt/images',
|
||||
:tftp_master_path => '/mnt/master_images',
|
||||
:instance_master_path => '/mnt/ironic/master_images',
|
||||
:uefi_pxe_bootfile_name => 'bootx64.efi',
|
||||
:uefi_pxe_config_template => 'foo-uefi',
|
||||
:ipxe_timeout => '60',
|
||||
:ipxe_enabled => true,
|
||||
:pxe_bootfile_name => 'bootx64',
|
||||
:pxe_append_params => 'foo',
|
||||
:pxe_config_template => 'bar',
|
||||
:tftp_server => '192.168.0.1',
|
||||
:tftp_root => '/mnt/ftp',
|
||||
:images_path => '/mnt/images',
|
||||
:tftp_master_path => '/mnt/master_images',
|
||||
:instance_master_path => '/mnt/ironic/master_images',
|
||||
:uefi_pxe_bootfile_name => 'bootx64.efi',
|
||||
:uefi_pxe_config_template => 'foo-uefi',
|
||||
:ipxe_timeout => '60',
|
||||
:ipxe_enabled => true,
|
||||
:pxe_bootfile_name => 'bootx64',
|
||||
:boot_retry_timeout => 600,
|
||||
:boot_retry_check_interval => 120,
|
||||
)
|
||||
end
|
||||
|
||||
@ -119,6 +121,8 @@ describe 'ironic::drivers::pxe' do
|
||||
is_expected.to contain_ironic_config('pxe/ipxe_timeout').with_value(p[:ipxe_timeout])
|
||||
is_expected.to contain_ironic_config('pxe/ipxe_enabled').with_value(p[:ipxe_enabled])
|
||||
is_expected.to contain_ironic_config('pxe/pxe_bootfile_name').with_value(p[:pxe_bootfile_name])
|
||||
is_expected.to contain_ironic_config('pxe/boot_retry_timeout').with_value(p[:boot_retry_timeout])
|
||||
is_expected.to contain_ironic_config('pxe/boot_retry_check_interval').with_value(p[:boot_retry_check_interval])
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user