inspector: Fix wrong type of default pxe_timeout

The pxe_timeout parameter should be set to an integer value (or
a string representing an integer) and can't be set to
the os_service_default fact.

Closes-Bug: #2058229
Change-Id: I7b04e5586c82fc528f960beddfe50a7b355f6580
This commit is contained in:
Takashi Kajinami 2024-03-18 20:12:42 +09:00
parent 76b07c7bda
commit 055a0f1749
2 changed files with 4 additions and 4 deletions

View File

@ -146,7 +146,7 @@
#
# [*ipxe_timeout*]
# (optional) ipxe timeout in second. Should be an integer.
# Defaults to $facts['os_service_default']
# Defaults to 0
#
# [*http_port*]
# (optional) port used by the HTTP service serving introspection images.
@ -337,7 +337,7 @@ class ironic::inspector (
String[1] $kernel_filename = 'agent.kernel',
$additional_processing_hooks = undef,
String $ramdisk_kernel_args = '',
$ipxe_timeout = $facts['os_service_default'],
$ipxe_timeout = 0,
$http_port = '8088',
$detect_boot_mode = $facts['os_service_default'],
$tftp_root = '/tftpboot',

View File

@ -2,6 +2,6 @@
:retry_boot
imgfree
kernel <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @kernel_filename %> ipa-inspection-callback-url=http://<%= @dnsmasq_local_ip_real %>:5050/v1/continue <%if !@ramdisk_collectors.nil? %>ipa-inspection-collectors=<%= @ramdisk_collectors %> <% end %>systemd.journald.forward_to_console=yes BOOTIF=${mac} <%= @ramdisk_kernel_args %> initrd=<%= @ramdisk_filename %> || goto retry_boot
initrd <% if @ipxe_timeout_real != "0" %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @ramdisk_filename %> || goto retry_boot
kernel <% if Integer(@ipxe_timeout_real) != 0 %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @kernel_filename %> ipa-inspection-callback-url=http://<%= @dnsmasq_local_ip_real %>:5050/v1/continue <%if !@ramdisk_collectors.nil? %>ipa-inspection-collectors=<%= @ramdisk_collectors %> <% end %>systemd.journald.forward_to_console=yes BOOTIF=${mac} <%= @ramdisk_kernel_args %> initrd=<%= @ramdisk_filename %> || goto retry_boot
initrd <% if Integer(@ipxe_timeout_real) != 0 %>--timeout <%= Integer(@ipxe_timeout_real) * 1000 %> <% end %>http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/<%= @ramdisk_filename %> || goto retry_boot
boot