Repository navigation
fix(roles/kernel_settings): work with fedora.linux_system_roles 2.5.0 - #416
Merged
Merged
Conversation
fedora.linux_system_roles 2.5.0 validates its input and accepts only null
for an unset systemd_cpu_affinity, transparent_hugepages or
transparent_hugepages_defrag, while LFOps passed the empty string of its
defaults. A template cannot hand a role a null (`{{ none }}` and `omit`
arrive as strings with ansible-core 2.16 and 2.18), so the three values
are set with set_fact only when they are set, and the role's own null
default applies otherwise. Since galaxy.yml requires '*', every fresh
installation pulls in 2.5.0 and the role aborted.
Verified on Rocky 9 with fedora.linux_system_roles 2.5.0: converge,
idempotent second run, THP set to madvise, `tuned-adm verify` clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fedora.linux_system_roles2.5.0 validates its input and rejects the empty string LFOps passed for an unsetsystemd_cpu_affinity,transparent_hugepagesortransparent_hugepages_defrag. Sincegalaxy.ymlrequires'*', every fresh installation pulls in 2.5.0, and the kernel_settings role aborted with "kernel_settings_transparent_hugepages must be null, one of always, madvise, never, or {"state": "absent"}".Changes
set_factonly when they are set, so the role's ownnulldefault applies otherwise. A template cannot hand a role anull:{{ none }}andomitarrive as strings (verified with ansible-core 2.16 and 2.18).transparent_hugepages: madviseand checks it in/sys/kernel/mm/transparent_hugepage/enabled; the other two values stay unset.Tests
fedora.linux_system_roles2.5.0: converge green, second runchanged=0, THP[madvise],tuned-adm verifyclean.roles/kernel_settings/tasks/main.ymland thekernel_settings/sysctlscenario are also touched by #412, so the second of the two to be merged needs a small conflict resolution.