From feea417befb1b03b4dd15b05c6203ab63d6e093c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 10 Dec 2021 13:12:08 +0900 Subject: [PATCH] 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 --- manifests/conductor.pp | 19 +++++++++++++++---- ...conductor-bootloader-42553c33ec6a8dc1.yaml | 5 +++++ spec/classes/ironic_conductor_spec.rb | 7 +++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/conductor-bootloader-42553c33ec6a8dc1.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 9c7e7ad2..542f7485 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -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; } diff --git a/releasenotes/notes/conductor-bootloader-42553c33ec6a8dc1.yaml b/releasenotes/notes/conductor-bootloader-42553c33ec6a8dc1.yaml new file mode 100644 index 00000000..e3d89def --- /dev/null +++ b/releasenotes/notes/conductor-bootloader-42553c33ec6a8dc1.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``ironic::conductor`` class now supports customizing + the ``[conductor] bootloader``, by the new ``bootloader`` parameter. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index a0d16b80..c1964565 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -84,6 +84,11 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '') is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with(:value => '') is_expected.to contain_ironic_config('conductor/conductor_group').with(:value => '') + is_expected.to contain_ironic_config('conductor/deploy_kernel').with(:value => '') + is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with(:value => '') + is_expected.to contain_ironic_config('conductor/rescue_kernel').with(:value => '') + is_expected.to contain_ironic_config('conductor/rescue_ramdisk').with(:value => '') + is_expected.to contain_ironic_config('conductor/bootloader').with(:value => '') is_expected.to contain_ironic_config('DEFAULT/image_download_concurrency').with(:value => '') 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