Need feedback for kernel_settings module implemented using tuned

8 views
Skip to first unread message

Richard Megginson

unread,
Jan 31, 2020, 9:15:50 PM1/31/20
to Ansible Development
Tuned is really nice because it supports many different kernel, cpu, disk, power, bootloader (very limited), etc. settings in one shot, and provides sysfs setting persistence on rhel/fedora.


So I thought I might have a go at creating a kernel_settings module implemented by importing the tuned code as a "library".  However, it's getting pretty complex pretty quickly - WIP: https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py

- Have to defeat tuned logging - https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L19-L54

- Hard to tell the difference between when tuned reports that a profile file was not found vs. had some other problem reading the tuned profile: https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L129-L150

- Have to convert the ansible dict parameters to a tempfile in order to create a tuned profile data type: https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L152-L178

- Have to use some protected members of internal tuned data structures: https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L222 and https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L145

I'm looking for some guidance from ansible module developers if this seems worth pursuing or maybe I should just use the sysctl module + implement my own sysfs support + use other existing modules.
Reply all
Reply to author
Forward
0 new messages