Merge "Add support for boot_retry_timeout and boot_retry_check_interval"

This commit is contained in:
Zuul 2019-09-24 06:53:07 +00:00 committed by Gerrit Code Review
commit b70efb17de
3 changed files with 58 additions and 37 deletions

View File

@ -81,6 +81,14 @@
# (optional) Boolean value to dtermine if ppc64le support should be enabled # (optional) Boolean value to dtermine if ppc64le support should be enabled
# Defaults to false (no ppc64le support) # 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 ( class ironic::drivers::pxe (
$ipxe_enabled = false, $ipxe_enabled = false,
$pxe_append_params = $::os_service_default, $pxe_append_params = $::os_service_default,
@ -95,6 +103,8 @@ class ironic::drivers::pxe (
$uefi_pxe_config_template = $::os_service_default, $uefi_pxe_config_template = $::os_service_default,
$ipxe_timeout = $::os_service_default, $ipxe_timeout = $::os_service_default,
$enable_ppc64le = false, $enable_ppc64le = false,
$boot_retry_timeout = $::os_service_default,
$boot_retry_check_interval = $::os_service_default,
) { ) {
include ::ironic::deps include ::ironic::deps
@ -124,6 +134,8 @@ class ironic::drivers::pxe (
'pxe/uefi_pxe_bootfile_name': value => $uefi_pxe_bootfile_name; 'pxe/uefi_pxe_bootfile_name': value => $uefi_pxe_bootfile_name;
'pxe/uefi_pxe_config_template': value => $uefi_pxe_config_template; 'pxe/uefi_pxe_config_template': value => $uefi_pxe_config_template;
'pxe/ipxe_timeout': value => $ipxe_timeout_real; '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 { if $enable_ppc64le {

View File

@ -0,0 +1,5 @@
---
features:
- |
Adds support for ``boot_retry_timeout`` and ``boot_retry_check_interval``
in ``ironic::drivers::pxe``.

View File

@ -103,6 +103,8 @@ describe 'ironic::drivers::pxe' do
:ipxe_timeout => '60', :ipxe_timeout => '60',
:ipxe_enabled => true, :ipxe_enabled => true,
:pxe_bootfile_name => 'bootx64', :pxe_bootfile_name => 'bootx64',
:boot_retry_timeout => 600,
:boot_retry_check_interval => 120,
) )
end 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_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/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/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
end end