conductor: Support (kernel|ramdisk)_by_arch options
Change-Id: I58ee4c149261e5074ec90256e369943dee0796e5
This commit is contained in:
@@ -167,6 +167,18 @@
|
|||||||
# the default deploy image.
|
# the default deploy image.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*deploy_kernel_by_arch*]
|
||||||
|
# (optional) A dictionary of key-value paris of each architecture with
|
||||||
|
# tle Glance ID, http:// or file:// URL of the kernel of the default
|
||||||
|
# deploy image.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*deploy_ramdisk_by_arch*]
|
||||||
|
# (optional) A dictionary of key-value paris of each architecture with
|
||||||
|
# tle Glance ID, http:// or file:// URL of the initramfs of the default
|
||||||
|
# deploy image.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
# [*rescue_kernel*]
|
# [*rescue_kernel*]
|
||||||
# (optional) Glance UUID, http:// or file:// URL of the kernel of
|
# (optional) Glance UUID, http:// or file:// URL of the kernel of
|
||||||
# the default rescue image.
|
# the default rescue image.
|
||||||
@@ -177,6 +189,18 @@
|
|||||||
# the default rescue image.
|
# the default rescue image.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*rescue_kernel_by_arch*]
|
||||||
|
# (optional) A dictionary of key-value paris of each architecture with
|
||||||
|
# tle Glance ID, http:// or file:// URL of the kernel of the default
|
||||||
|
# rescue image.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*rescue_ramdisk_by_arch*]
|
||||||
|
# (optional) A dictionary of key-value paris of each architecture with
|
||||||
|
# tle Glance ID, http:// or file:// URL of the initramfs of the default
|
||||||
|
# rescue image.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
# [*bootloader*]
|
# [*bootloader*]
|
||||||
# (optional) Glance ID, http:// or file:// URL of the EFI system partition
|
# (optional) Glance ID, http:// or file:// URL of the EFI system partition
|
||||||
# image containing EFI boot loader.
|
# image containing EFI boot loader.
|
||||||
@@ -240,8 +264,12 @@ class ironic::conductor (
|
|||||||
$conductor_group = $facts['os_service_default'],
|
$conductor_group = $facts['os_service_default'],
|
||||||
$deploy_kernel = $facts['os_service_default'],
|
$deploy_kernel = $facts['os_service_default'],
|
||||||
$deploy_ramdisk = $facts['os_service_default'],
|
$deploy_ramdisk = $facts['os_service_default'],
|
||||||
|
$deploy_kernel_by_arch = $facts['os_service_default'],
|
||||||
|
$deploy_ramdisk_by_arch = $facts['os_service_default'],
|
||||||
$rescue_kernel = $facts['os_service_default'],
|
$rescue_kernel = $facts['os_service_default'],
|
||||||
$rescue_ramdisk = $facts['os_service_default'],
|
$rescue_ramdisk = $facts['os_service_default'],
|
||||||
|
$rescue_kernel_by_arch = $facts['os_service_default'],
|
||||||
|
$rescue_ramdisk_by_arch = $facts['os_service_default'],
|
||||||
$bootloader = $facts['os_service_default'],
|
$bootloader = $facts['os_service_default'],
|
||||||
$allow_provisioning_in_maintenance = $facts['os_service_default'],
|
$allow_provisioning_in_maintenance = $facts['os_service_default'],
|
||||||
$image_download_concurrency = $facts['os_service_default'],
|
$image_download_concurrency = $facts['os_service_default'],
|
||||||
@@ -282,6 +310,23 @@ class ironic::conductor (
|
|||||||
include ironic::pxe::common
|
include ironic::pxe::common
|
||||||
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
||||||
|
|
||||||
|
$deploy_kernel_by_arch_real = $deploy_kernel_by_arch ? {
|
||||||
|
Hash => join(join_keys_to_values($deploy_kernel_by_arch, ':'), ','),
|
||||||
|
default => join(any2array($deploy_kernel_by_arch), ','),
|
||||||
|
}
|
||||||
|
$deploy_ramdisk_by_arch_real = $deploy_ramdisk_by_arch ? {
|
||||||
|
Hash => join(join_keys_to_values($deploy_ramdisk_by_arch, ':'), ','),
|
||||||
|
default => join(any2array($deploy_ramdisk_by_arch), ','),
|
||||||
|
}
|
||||||
|
$rescue_kernel_by_arch_real = $rescue_kernel_by_arch ? {
|
||||||
|
Hash => join(join_keys_to_values($rescue_kernel_by_arch, ':'), ','),
|
||||||
|
default => join(any2array($rescue_kernel_by_arch), ','),
|
||||||
|
}
|
||||||
|
$rescue_ramdisk_by_arch_real = $rescue_ramdisk_by_arch ? {
|
||||||
|
Hash => join(join_keys_to_values($rescue_ramdisk_by_arch, ':'), ','),
|
||||||
|
default => join(any2array($rescue_ramdisk_by_arch), ','),
|
||||||
|
}
|
||||||
|
|
||||||
# Configure ironic.conf
|
# Configure ironic.conf
|
||||||
ironic_config {
|
ironic_config {
|
||||||
'DEFAULT/enabled_hardware_types': value => join(any2array($enabled_hardware_types), ',');
|
'DEFAULT/enabled_hardware_types': value => join(any2array($enabled_hardware_types), ',');
|
||||||
@@ -308,8 +353,12 @@ class ironic::conductor (
|
|||||||
'conductor/conductor_group': value => $conductor_group;
|
'conductor/conductor_group': value => $conductor_group;
|
||||||
'conductor/deploy_kernel': value => $deploy_kernel;
|
'conductor/deploy_kernel': value => $deploy_kernel;
|
||||||
'conductor/deploy_ramdisk': value => $deploy_ramdisk;
|
'conductor/deploy_ramdisk': value => $deploy_ramdisk;
|
||||||
|
'conductor/deploy_kernel_by_arch': value => $deploy_kernel_by_arch_real;
|
||||||
|
'conductor/deploy_ramdisk_by_arch': value => $deploy_ramdisk_by_arch_real;
|
||||||
'conductor/rescue_kernel': value => $rescue_kernel;
|
'conductor/rescue_kernel': value => $rescue_kernel;
|
||||||
'conductor/rescue_ramdisk': value => $rescue_ramdisk;
|
'conductor/rescue_ramdisk': value => $rescue_ramdisk;
|
||||||
|
'conductor/rescue_kernel_by_arch': value => $rescue_kernel_by_arch_real;
|
||||||
|
'conductor/rescue_ramdisk_by_arch': value => $rescue_ramdisk_by_arch_real;
|
||||||
'conductor/bootloader': value => $bootloader;
|
'conductor/bootloader': value => $bootloader;
|
||||||
'conductor/allow_provisioning_in_maintenance': value => $allow_provisioning_in_maintenance;
|
'conductor/allow_provisioning_in_maintenance': value => $allow_provisioning_in_maintenance;
|
||||||
'DEFAULT/image_download_concurrency': value => $image_download_concurrency;
|
'DEFAULT/image_download_concurrency': value => $image_download_concurrency;
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following parameters have been added to the ``ironic::conductor``
|
||||||
|
class.
|
||||||
|
|
||||||
|
- ``deploy_kernel_by_arch``
|
||||||
|
- ``deploy_ramdisk_by_arch``
|
||||||
|
- ``ramdisk_kernel_by_arch``
|
||||||
|
- ``ramdisk_ramdisk_by_arch``
|
||||||
@@ -92,8 +92,12 @@ describe 'ironic::conductor' do
|
|||||||
is_expected.to contain_ironic_config('conductor/conductor_group').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_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/deploy_ramdisk').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('conductor/deploy_kernel_by_arch').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('conductor/deploy_ramdisk_by_arch').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_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/rescue_ramdisk').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('conductor/rescue_kernel_by_arch').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
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').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/image_download_concurrency').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/deploy_callback_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||||
@@ -130,8 +134,12 @@ describe 'ironic::conductor' do
|
|||||||
:conductor_group => 'in-the-closet-to-the-left',
|
:conductor_group => 'in-the-closet-to-the-left',
|
||||||
:deploy_kernel => 'http://host/deploy.kernel',
|
:deploy_kernel => 'http://host/deploy.kernel',
|
||||||
:deploy_ramdisk => 'http://host/deploy.ramdisk',
|
:deploy_ramdisk => 'http://host/deploy.ramdisk',
|
||||||
|
:deploy_kernel_by_arch => {'x86_64' => 'http://host/deploy.kernel'},
|
||||||
|
:deploy_ramdisk_by_arch => {'x86_64' => 'http://host/deploy.ramdisk'},
|
||||||
:rescue_kernel => 'http://host/rescue.kernel',
|
:rescue_kernel => 'http://host/rescue.kernel',
|
||||||
:rescue_ramdisk => 'http://host/rescue.ramdisk',
|
:rescue_ramdisk => 'http://host/rescue.ramdisk',
|
||||||
|
:rescue_kernel_by_arch => {'x86_64' => 'http://host/rescue.kernel'},
|
||||||
|
:rescue_ramdisk_by_arch => {'x86_64' => 'http://host/rescue.ramdisk'},
|
||||||
:bootloader => 'http://host/bootloader',
|
:bootloader => 'http://host/bootloader',
|
||||||
:allow_provisioning_in_maintenance => false,
|
:allow_provisioning_in_maintenance => false,
|
||||||
:image_download_concurrency => 20,
|
:image_download_concurrency => 20,
|
||||||
@@ -168,8 +176,12 @@ describe 'ironic::conductor' do
|
|||||||
is_expected.to contain_ironic_config('conductor/conductor_group').with_value(p[:conductor_group])
|
is_expected.to contain_ironic_config('conductor/conductor_group').with_value(p[:conductor_group])
|
||||||
is_expected.to contain_ironic_config('conductor/deploy_kernel').with_value(p[:deploy_kernel])
|
is_expected.to contain_ironic_config('conductor/deploy_kernel').with_value(p[:deploy_kernel])
|
||||||
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with_value(p[:deploy_ramdisk])
|
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with_value(p[:deploy_ramdisk])
|
||||||
|
is_expected.to contain_ironic_config('conductor/deploy_kernel_by_arch').with_value('x86_64:http://host/deploy.kernel')
|
||||||
|
is_expected.to contain_ironic_config('conductor/deploy_ramdisk_by_arch').with_value('x86_64:http://host/deploy.ramdisk')
|
||||||
is_expected.to contain_ironic_config('conductor/rescue_kernel').with_value(p[:rescue_kernel])
|
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/rescue_ramdisk').with_value(p[:rescue_ramdisk])
|
||||||
|
is_expected.to contain_ironic_config('conductor/rescue_kernel_by_arch').with_value('x86_64:http://host/rescue.kernel')
|
||||||
|
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').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('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('DEFAULT/image_download_concurrency').with_value(p[:image_download_concurrency])
|
||||||
|
|||||||
Reference in New Issue
Block a user