Add support for [conductor] error_on_ramdisk_config_inconsistency

This option was introduced during this cycle.

Depends-on: https://review.opendev.org/941611
Change-Id: I2459d50438c23303255808c779ef55adc31fd851
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-07-30 23:16:29 +09:00
parent 194e20d0ac
commit f4eb838b55
3 changed files with 145 additions and 130 deletions

View File

@@ -222,6 +222,11 @@
# containing EFI boot loader.
# Defaults to $facts['os_service_default']
#
# [*error_on_ramdisk_config_inconsistency*]
# (optional) Determine if Ironic should fail to boot ramdisk in situation
# where configuration is ambiguous.
# Defaults to $facts['os_service_default']
#
# [*allow_provisioning_in_maintenance*]
# (optional) Whether to allow nodes to enter or undergo deploy or cleaning
# when in maintenance mode. If this option is set to False, and a node enters
@@ -300,6 +305,7 @@ class ironic::conductor (
$rescue_ramdisk_by_arch = $facts['os_service_default'],
$bootloader = $facts['os_service_default'],
$bootloader_by_arch = $facts['os_service_default'],
$error_on_ramdisk_config_inconsistency = $facts['os_service_default'],
$allow_provisioning_in_maintenance = $facts['os_service_default'],
$image_download_concurrency = $facts['os_service_default'],
$deploy_callback_timeout = $facts['os_service_default'],
@@ -398,6 +404,7 @@ class ironic::conductor (
'conductor/rescue_ramdisk_by_arch': value => $rescue_ramdisk_by_arch_real;
'conductor/bootloader': value => $bootloader;
'conductor/bootloader_by_arch': value => $bootloader_by_arch_real;
'conductor/error_on_ramdisk_config_inconsistency': value => $error_on_ramdisk_config_inconsistency;
'conductor/allow_provisioning_in_maintenance': value => $allow_provisioning_in_maintenance;
'DEFAULT/image_download_concurrency': value => $image_download_concurrency;
'conductor/deploy_callback_timeout': value => $deploy_callback_timeout;

View File

@@ -0,0 +1,5 @@
---
features:
- |
The new ``ironic::conductor::error_on_ramdisk_config_inconsistency``
parameter has been added.

View File

@@ -101,6 +101,7 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/rescue_ramdisk_by_arch').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/bootloader').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/bootloader_by_arch').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/error_on_ramdisk_config_inconsistency').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/image_download_concurrency').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/deploy_callback_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/heartbeat_interval').with(:value => '<SERVICE DEFAULT>')
@@ -148,6 +149,7 @@ describe 'ironic::conductor' do
:rescue_ramdisk_by_arch => {'x86_64' => 'http://host/rescue.ramdisk'},
:bootloader => 'http://host/bootloader',
:bootloader_by_arch => {'x86_64' => 'http://host/bootloader'},
:error_on_ramdisk_config_inconsistency => false,
:allow_provisioning_in_maintenance => false,
:image_download_concurrency => 20,
:deploy_callback_timeout => 1800,
@@ -195,6 +197,7 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/rescue_ramdisk_by_arch').with_value('x86_64:http://host/rescue.ramdisk')
is_expected.to contain_ironic_config('conductor/bootloader').with_value(p[:bootloader])
is_expected.to contain_ironic_config('conductor/bootloader_by_arch').with_value('x86_64:http://host/bootloader')
is_expected.to contain_ironic_config('conductor/error_on_ramdisk_config_inconsistency').with_value(false)
is_expected.to contain_ironic_config('conductor/allow_provisioning_in_maintenance').with_value(p[:allow_provisioning_in_maintenance])
is_expected.to contain_ironic_config('DEFAULT/image_download_concurrency').with_value(p[:image_download_concurrency])
is_expected.to contain_ironic_config('conductor/deploy_callback_timeout').with_value(p[:deploy_callback_timeout])