Add support for [conductor] bootloader

.. and update description of the parameters to point kernel/initramfs
images according to the latest parameter descriptions in ironic.

Change-Id: I4c86174ff12d7c5550839f3e508591cbd5b261a1
This commit is contained in:
Takashi Kajinami 2021-12-10 13:12:08 +09:00
parent e59a538bda
commit feea417bef
3 changed files with 27 additions and 4 deletions

View File

@ -181,19 +181,28 @@
# Defaults to $::os_service_default
#
# [*deploy_kernel*]
# (optional) Glance UUID or URL of a deploy kernel to use by default.
# (optional) Glance UUID, http:// or file:// URL of the kernel of
# the default deploy image.
# Defaults to $::os_service_default
#
# [*deploy_ramdisk*]
# (optional) Glance UUID or URL of a deploy ramdisk to use by default.
# (optional) Glance UUID, http:// or file:// URL of the initramfs of
# the default deploy image.
# Defaults to $::os_service_default
#
# [*rescue_kernel*]
# (optional) Glance UUID or URL of a rescue kernel to use by default.
# (optional) Glance UUID, http:// or file:// URL of the kernel of
# the default rescue image.
# Defaults to $::os_service_default
#
# [*rescue_ramdisk*]
# (optional) Glance UUID or URL of a rescue ramdisk to use by default.
# (optional) Glance UUID, http:// or file:// URL of the initramfs of
# the default rescue image.
# Defaults to $::os_service_default
#
# [*bootloader*]
# (optional) Glance ID, http:// or file:// URL of the EFI system partition
# image containing EFI boot loader.
# Defaults to $::os_service_default
#
# [*allow_provisioning_in_maintenance*]
@ -260,6 +269,7 @@ class ironic::conductor (
$deploy_ramdisk = $::os_service_default,
$rescue_kernel = $::os_service_default,
$rescue_ramdisk = $::os_service_default,
$bootloader = $::os_service_default,
$allow_provisioning_in_maintenance = $::os_service_default,
$image_download_concurrency = $::os_service_default,
# DEPRECATED PARAMETERS
@ -370,6 +380,7 @@ Use inspect_wait_timeout instead')
'conductor/deploy_ramdisk': value => $deploy_ramdisk;
'conductor/rescue_kernel': value => $rescue_kernel;
'conductor/rescue_ramdisk': value => $rescue_ramdisk;
'conductor/bootloader': value => $bootloader;
'conductor/allow_provisioning_in_maintenance': value => $allow_provisioning_in_maintenance;
'DEFAULT/image_download_concurrency': value => $image_download_concurrency;
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``ironic::conductor`` class now supports customizing
the ``[conductor] bootloader``, by the new ``bootloader`` parameter.

View File

@ -84,6 +84,11 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/conductor_group').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/deploy_kernel').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/rescue_kernel').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/rescue_ramdisk').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/bootloader').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/image_download_concurrency').with(:value => '<SERVICE DEFAULT>')
end
@ -119,6 +124,7 @@ describe 'ironic::conductor' do
:deploy_ramdisk => 'http://host/deploy.ramdisk',
:rescue_kernel => 'http://host/rescue.kernel',
:rescue_ramdisk => 'http://host/rescue.ramdisk',
:bootloader => 'http://host/bootloader',
:allow_provisioning_in_maintenance => false,
:image_download_concurrency => 20,
)
@ -154,6 +160,7 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with_value(p[:deploy_ramdisk])
is_expected.to contain_ironic_config('conductor/rescue_kernel').with_value(p[:rescue_kernel])
is_expected.to contain_ironic_config('conductor/rescue_ramdisk').with_value(p[:rescue_ramdisk])
is_expected.to contain_ironic_config('conductor/bootloader').with_value(p[:bootloader])
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])
end