Skip to content

fix(roles/kernel_settings): work with fedora.linux_system_roles 2.5.0 - #416

Merged
NavidSassan merged 1 commit into
mainfrom
fix/kernel-settings-linux-system-roles-2
Oct 2, 2026
Merged

NavidSassan merged 1 commit into
mainfrom
fix/kernel-settings-linux-system-roles-2

Conversation

@markuslf

@markuslf markuslf commented Oct 2, 2026

Copy link
Copy Markdown
Member

fedora.linux_system_roles 2.5.0 validates its input and rejects the empty string LFOps passed for an unset systemd_cpu_affinity, transparent_hugepages or transparent_hugepages_defrag. Since galaxy.yml requires '*', 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

  • role:kernel_settings: the three values are passed with set_fact only when they are set, so the role's own null default applies otherwise. A template cannot hand a role a null: {{ none }} and omit arrive as strings (verified with ansible-core 2.16 and 2.18).
  • molecule kernel_settings/sysctl: sets transparent_hugepages: madvise and checks it in /sys/kernel/mm/transparent_hugepage/enabled; the other two values stay unset.

Tests

  • Rocky 9 lab VM with fedora.linux_system_roles 2.5.0: converge green, second run changed=0, THP [madvise], tuned-adm verify clean.
  • The Molecule scenario could not be run: VM creation failed in the ARP-based address discovery on Rocky 8 and 10 while the host was under load.

roles/kernel_settings/tasks/main.yml and the kernel_settings/sysctl scenario are also touched by #412, so the second of the two to be merged needs a small conflict resolution.

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.
@NavidSassan
NavidSassan merged commit 4af8e62 into main Oct 2, 2026
13 checks passed
@NavidSassan
NavidSassan deleted the fix/kernel-settings-linux-system-roles-2 branch October 2, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants