diff --git a/doc/source/install/configure-glance-images.rst b/doc/source/install/configure-glance-images.rst index 62d1bd8e57..5cdecfad2c 100644 --- a/doc/source/install/configure-glance-images.rst +++ b/doc/source/install/configure-glance-images.rst @@ -97,15 +97,14 @@ Deploy ramdisk images #. Configure the Bare Metal service to use the produced images. It can be done per node as described in :doc:`enrollment` or in the configuration - file either using a dictionary to specify them by architecture as follows: + file either using a dictionary to specify them by architecture (matching + the node's ``cpu_arch`` property) as follows: .. code-block:: ini [conductor] - deploy_kernel_by_arch = {'x86_64': , - 'aarch64': } - deploy_ramdisk_by_arch = {'x86_64': , - 'aarch64': } + deploy_kernel_by_arch = x86_64:,aarch64: + deploy_ramdisk_by_arch = x86_64:,aarch64: or globally using the general configuration parameters: diff --git a/ironic/conf/conductor.py b/ironic/conf/conductor.py index 416d30ccb0..3c6261536f 100644 --- a/ironic/conf/conductor.py +++ b/ironic/conf/conductor.py @@ -205,17 +205,11 @@ opts = [ 'endpoint via multicast DNS.')), cfg.StrOpt('deploy_kernel', mutable=True, - deprecated_for_removal=True, - deprecated_reason=_('Replaced by deploy_kernel_by_arch which ' - 'provides more configuration options.'), - help=_('DEPRECATED: Glance ID, http:// or file:// URL of the ' + help=_('Glance ID, http:// or file:// URL of the ' 'kernel of the default deploy image.')), cfg.StrOpt('deploy_ramdisk', mutable=True, - deprecated_for_removal=True, - deprecated_reason=_('Replaced by deploy_ramdisk_by_arch which ' - 'provides more configuration options.'), - help=_('DEPRECATED: Glance ID, http:// or file:// URL of the ' + help=_('Glance ID, http:// or file:// URL of the ' 'initramfs of the default deploy image.')), cfg.DictOpt('deploy_kernel_by_arch', default={}, @@ -231,17 +225,11 @@ opts = [ 'initramfs of the default deploy image.')), cfg.StrOpt('rescue_kernel', mutable=True, - deprecated_for_removal=True, - deprecated_reason=_('Replaced by rescue_kernel_by_arch which ' - 'provides more configuration options.'), - help=_('DEPRECATED: Glance ID, http:// or file:// URL of the ' + help=_('Glance ID, http:// or file:// URL of the ' 'kernel of the default rescue image.')), cfg.StrOpt('rescue_ramdisk', mutable=True, - deprecated_for_removal=True, - deprecated_reason=_('Replaced by rescue_ramdisk_by_arch which ' - 'provides more configuration options.'), - help=_('DEPRECATED: Glance ID, http:// or file:// URL of the ' + help=_('Glance ID, http:// or file:// URL of the ' 'initramfs of the default rescue image.')), cfg.DictOpt('rescue_kernel_by_arch', default={}, diff --git a/ironic/drivers/utils.py b/ironic/drivers/utils.py index 2a62cd54b2..642bdb33f6 100644 --- a/ironic/drivers/utils.py +++ b/ironic/drivers/utils.py @@ -463,12 +463,9 @@ def get_agent_kernel_ramdisk(node, mode='deploy', deprecated_prefix=None): kernel_dict = getattr(CONF.conductor, kernel_dict_param_name) ramdisk_dict = getattr(CONF.conductor, ramdisk_dict_param_name) cpu_arch = node.properties.get('cpu_arch') - kernel_for_this_arch = kernel_dict.get(cpu_arch) - ramdisk_for_this_arch = ramdisk_dict.get(cpu_arch) - if kernel_for_this_arch and ramdisk_for_this_arch: - kernel = kernel_for_this_arch - ramdisk = ramdisk_for_this_arch - else: + kernel = kernel_dict.get(cpu_arch) if cpu_arch else None + ramdisk = ramdisk_dict.get(cpu_arch) if cpu_arch else None + if not kernel or not ramdisk: kernel = getattr(CONF.conductor, kernel_name) ramdisk = getattr(CONF.conductor, ramdisk_name) return { diff --git a/releasenotes/notes/deploy-kernels-8998a9c301db483b.yaml b/releasenotes/notes/deploy-kernels-8998a9c301db483b.yaml new file mode 100644 index 0000000000..eeedcc9f25 --- /dev/null +++ b/releasenotes/notes/deploy-kernels-8998a9c301db483b.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + The ``deploy_kernel``, ``deploy_ramdisk``, ``rescue_kernel`` and + ``rescue_ramdisk`` configuration options, incorrectly deprecated in the + 2023.2 release series, are no longer deprecated.