Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
TuneD 2.18.0+ fails to parse inline comments properly. An example of TuneD configuration file that poses issues for the parser:
[main]
summary=PoC
[cpu]
governor=performance # This is a comment
[service]
service.stalld=start,enable # This is a comment
[vm]
transparent_hugepages=never # This is a comment
[selinux]
avc_cache_threshold=8192 # This is a comment
[net]
nf_conntrack_hashsize=131072 # This is a comment
How reproducible:
Always
Actual results:
2022-03-02 14:29:27,274 INFO tuned.daemon.application: TuneD: 2.18.0, kernel: 4.18.0-240.el8.x86_64
2022-03-02 14:29:27,274 INFO tuned.daemon.application: dynamic tuning is globally disabled
2022-03-02 14:29:27,278 INFO tuned.daemon.daemon: using sleep interval of 1 second(s)
2022-03-02 14:29:27,278 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration.
2022-03-02 14:29:27,279 INFO tuned.daemon.daemon: Using 'bz' profile
2022-03-02 14:29:27,280 INFO tuned.profiles.loader: loading profile: bz
2022-03-02 14:29:27,281 INFO tuned.daemon.controller: starting controller
2022-03-02 14:29:27,281 INFO tuned.daemon.daemon: starting tuning
2022-03-02 14:29:27,303 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu1
2022-03-02 14:29:27,307 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform
2022-03-02 14:29:27,309 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias
2022-03-02 14:29:27,310 ERROR tuned.plugins.plugin_service: service 'stalld': invalid service option: 'enable # This is a comment'
2022-03-02 14:29:27,311 INFO tuned.plugins.base: instance net: assigning devices eth0
2022-03-02 14:29:27,382 WARNING tuned.plugins.plugin_vm: Incorrect 'transparent_hugepages' value 'never # This is a comment'.
2022-03-02 14:29:27,383 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: invalid literal for int() with base 10: '8192\t\t\t# This is a comment'
2022-03-02 14:29:27,383 ERROR tuned.units.manager: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 78, in apply_tuning
self._plugin.instance_apply_tuning(self)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning
self._instance_apply_static(instance)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 317, in _instance_apply_static
self._execute_all_non_device_commands(instance)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 433, in _execute_all_non_device_commands
self._execute_non_device_command(instance, command, new_value)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 514, in _execute_non_device_command
command["set"](new_value, sim = False)
File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_selinux.py", line 49, in _set_avc_cache_threshold
threshold = int(value)
ValueError: invalid literal for int() with base 10: '8192\t\t\t# This is a comment'
2022-03-02 14:29:27,384 ERROR tuned.utils.commands: Error when reading file '/sys/module/nf_conntrack/parameters/hashsize': '[Errno 2] No such file or directory: '/sys/module/nf_conntrack/parameters/hashsize''
2022-03-02 14:29:27,384 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: invalid literal for int() with base 10: '131072 \t\t\t# This is a comment'
2022-03-02 14:29:27,384 ERROR tuned.units.manager: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 78, in apply_tuning
self._plugin.instance_apply_tuning(self)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning
self._instance_apply_static(instance)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 317, in _instance_apply_static
self._execute_all_non_device_commands(instance)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 433, in _execute_all_non_device_commands
self._execute_non_device_command(instance, command, new_value)
File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 514, in _execute_non_device_command
command["set"](new_value, sim = False)
File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_net.py", line 275, in _set_nf_conntrack_hashsize
hashsize = int(value)
ValueError: invalid literal for int() with base 10: '131072 \t\t\t# This is a comment'
Expected results:
TuneD config file properly parsed with inline comments.
Additional info:
https://github.com/redhat-performance/tuned/pull/380
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (tuned bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:7747
Description of problem: TuneD 2.18.0+ fails to parse inline comments properly. An example of TuneD configuration file that poses issues for the parser: [main] summary=PoC [cpu] governor=performance # This is a comment [service] service.stalld=start,enable # This is a comment [vm] transparent_hugepages=never # This is a comment [selinux] avc_cache_threshold=8192 # This is a comment [net] nf_conntrack_hashsize=131072 # This is a comment How reproducible: Always Actual results: 2022-03-02 14:29:27,274 INFO tuned.daemon.application: TuneD: 2.18.0, kernel: 4.18.0-240.el8.x86_64 2022-03-02 14:29:27,274 INFO tuned.daemon.application: dynamic tuning is globally disabled 2022-03-02 14:29:27,278 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2022-03-02 14:29:27,278 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2022-03-02 14:29:27,279 INFO tuned.daemon.daemon: Using 'bz' profile 2022-03-02 14:29:27,280 INFO tuned.profiles.loader: loading profile: bz 2022-03-02 14:29:27,281 INFO tuned.daemon.controller: starting controller 2022-03-02 14:29:27,281 INFO tuned.daemon.daemon: starting tuning 2022-03-02 14:29:27,303 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu1 2022-03-02 14:29:27,307 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2022-03-02 14:29:27,309 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2022-03-02 14:29:27,310 ERROR tuned.plugins.plugin_service: service 'stalld': invalid service option: 'enable # This is a comment' 2022-03-02 14:29:27,311 INFO tuned.plugins.base: instance net: assigning devices eth0 2022-03-02 14:29:27,382 WARNING tuned.plugins.plugin_vm: Incorrect 'transparent_hugepages' value 'never # This is a comment'. 2022-03-02 14:29:27,383 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: invalid literal for int() with base 10: '8192\t\t\t# This is a comment' 2022-03-02 14:29:27,383 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 78, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 317, in _instance_apply_static self._execute_all_non_device_commands(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 433, in _execute_all_non_device_commands self._execute_non_device_command(instance, command, new_value) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 514, in _execute_non_device_command command["set"](new_value, sim = False) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_selinux.py", line 49, in _set_avc_cache_threshold threshold = int(value) ValueError: invalid literal for int() with base 10: '8192\t\t\t# This is a comment' 2022-03-02 14:29:27,384 ERROR tuned.utils.commands: Error when reading file '/sys/module/nf_conntrack/parameters/hashsize': '[Errno 2] No such file or directory: '/sys/module/nf_conntrack/parameters/hashsize'' 2022-03-02 14:29:27,384 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: invalid literal for int() with base 10: '131072 \t\t\t# This is a comment' 2022-03-02 14:29:27,384 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 78, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 317, in _instance_apply_static self._execute_all_non_device_commands(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 433, in _execute_all_non_device_commands self._execute_non_device_command(instance, command, new_value) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 514, in _execute_non_device_command command["set"](new_value, sim = False) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_net.py", line 275, in _set_nf_conntrack_hashsize hashsize = int(value) ValueError: invalid literal for int() with base 10: '131072 \t\t\t# This is a comment' Expected results: TuneD config file properly parsed with inline comments. Additional info: https://github.com/redhat-performance/tuned/pull/380