Merge "Adding Hugepages role parameter"

This commit is contained in:
Zuul 2022-02-25 01:32:20 +00:00 committed by Gerrit Code Review
commit 4fb19e644a
2 changed files with 56 additions and 0 deletions

View File

@ -67,6 +67,33 @@ parameters:
default: 900
type: number
description: Timeout in seconds to specify the wait time for ansible node reboot
Hugepages:
default: {}
type: json
description: >
Hash for hugepage configuration
Example:
Hugepages:
2048:
count: 100
default: false
1048576:
count: 100
default: true
tags:
- role_specific
ReconfigureHugepages:
default: false
type: boolean
description: >
By default, tripleo-kernel will configure the provided Hugepages as specified by operators
but it won't try to remove Hugepages configured on the host that are not part of the TripleO
paramater. Enabling this setting will make sure everything is reconfigured exactly like the
TripleO parameter, otherwise we just add the content of the Hugepages parameter to what's
already in place.
tags:
- role_specific
resources:
RoleParametersValue:
@ -80,12 +107,16 @@ resources:
isolated_cores: IsolCpusList
kernel_args: KernelArgs
kernel_args_defer_reboot: KernelArgsDeferReboot
hugepages: Hugepages
reconfigure_hugepages: ReconfigureHugepages
- values: {get_param: [RoleParameters]}
- values:
TunedProfileName: {get_param: TunedProfileName}
IsolCpusList: {get_param: IsolCpusList}
KernelArgs: {get_param: KernelArgs}
KernelArgsDeferReboot: {get_param: KernelArgsDeferReboot}
Hugepages: {get_param: Hugepages}
ReconfigureHugepages: {get_param: ReconfigureHugepages}
outputs:
role_data:
@ -109,6 +140,8 @@ outputs:
tasks_from: kernelargs.yml
vars:
tripleo_kernel_args: {get_attr: [RoleParametersValue, value, kernel_args]}
tripleo_kernel_hugepages: {get_attr: [RoleParametersValue, value, hugepages]}
tripleo_kernel_hugepages_remove: {get_attr: [RoleParametersValue, value, reconfigure_hugepages]}
tripleo_kernel_defer_reboot: {get_attr: [RoleParametersValue, value, kernel_args_defer_reboot]}
tripleo_kernel_reboot_timeout: {get_param: NodeRebootWaitTimeout}
upgrade_tasks:

View File

@ -0,0 +1,23 @@
---
features:
- |
Adding Hugepages role parameter
Hugepages management was always a manual step done by operators via the
TripleO parameter ``KernelArgs``. This is error prone and causing confusion.
The new ``Hugepages`` parameter allow operators to define hugepages as
dictionnary, making it easier to read and follow.
To prevent unvolontary changes, there's multiple validations before
applying a change:
- We convert the current running configurations to an actual dictionnary
that we validate the new format against
- If no change is necessary, even though the format might not be the same,
there's no kernel_args update.
- By default, we don't remove hugepages in places except when operators
specifically set the ``ReconfigureHugepages`` to true.
This change is also opening the door to more automations and automatic
tuning.