
The various *_by_arch configurations were being applied inconsistently across boot drivers. This unifies the logic across the drivers and ensures consistent setting of kernel/ramdisk. An inconsistent setting of kernel/ramdisk is any case where we can't get *both* the kernel and ramdisk to use from the same configuration type. For instance, a node-level override in driver_info that specifies a deploy_kernel but no deploy_ramdisk. These represent a misconfiguration at a base level, since kernels and ramdisks must be tightly coupled. This adds validation at startup such that if any X_ramdisk_by_arch and X_kernel_by_arch configurations exist that are not mirrored -- e.g. a kernel exists for aarch64 but no ramdisk, Ironic will print a warning log on start. We've also unified behavior when inconsistencies occur at runtime: - If CONF.conductor.error_on_ramdisk_config_inconsistency is True, an inconsistency will cause an exception to be immediately raised, failing whatever operation was needing to boot a ramdisk to immediately fail. - If CONF.conductor.error_on_ramdisk_config_inconsistency is False, Ironic will fall back to a less specific configuration -- for instance, if driver_info[deploy_ramdisk] is set but not driver_info[deploy_kernel], Ironic would fall back to the next-less-specific option, the deploy_*_by_arch config options. If those are inconsistent, we'd fail back to deploy_kernel/deploy_ramdisk -- the global default. Previous behavior varied by driver, but in the worst cases would combine a deploy_kernel from one level (e.g. driver_info) and deploy_ramdisk from another (e.g. global default) or vice versa. This behavior is considered a bug as kernels are matched up with ramdisks and generally are not interchangable. We expect at a future Ironic release to enable strict validation of ramdisk/kernel consistency. Closes-bug: 2097798 Change-Id: I429a651894be4b31a6faa5dfac0f58dd75ce8f79
38 lines
1.8 KiB
YAML
38 lines
1.8 KiB
YAML
---
|
|
features:
|
|
- |
|
|
Added a new configuration option
|
|
``[conductor]error_on_ramdisk_config_inconsistency`` to control how Ironic
|
|
handles inconsistent kernel and ramdisk configurations.
|
|
|
|
When ``error_on_ramdisk_config_inconsistency`` is set to ``True``, Ironic
|
|
will raise a ``MissingParameterValue`` exception when it encounters
|
|
inconsistent kernel/ramdisk configurations, such as:
|
|
|
|
* A node's ``driver_info`` containing only ``deploy_kernel`` but missing
|
|
``deploy_ramdisk`` (or vice versa)
|
|
* The ``[conductor]deploy_kernel_by_arch`` configuration having entries for
|
|
architectures that are missing from ``[conductor]deploy_ramdisk_by_arch``
|
|
(or vice versa)
|
|
* Similar inconsistencies with rescue kernel/ramdisk configurations
|
|
|
|
When set to ``False`` (the default), Ironic will log warning messages about
|
|
these inconsistencies but continue operation by falling back to global
|
|
configuration values when possible.
|
|
|
|
In a future Ironic release, the default of this value will be changed to
|
|
True to enforce strict validation.
|
|
|
|
upgrade:
|
|
- |
|
|
The new ``[conductor]error_on_ramdisk_config_inconsistency`` configuration
|
|
option defaults to ``False`` to maintain backward compatibility. Existing
|
|
deployments with inconsistent kernel/ramdisk configurations will continue
|
|
to work as before, with warning messages logged to help identify potential
|
|
configuration issues.
|
|
|
|
Operators who want strict validation of kernel/ramdisk configurations can
|
|
set this option to ``True``, but should first review their configurations
|
|
to ensure consistency across all node ``driver_info`` entries and
|
|
architecture-specific configuration options. Ironic expects to enable
|
|
strict validation of these values in a future release. |