tuned: Exception "ValueError" occurs because '>4096' is passed to int().
Issue
When tuned sets readahead parameter to read_ahead_kb in sysfs (e.g. /sys/block/sda/queue/read_ahead_kb), exception "ValueErrror" on python occurs because '>4096' is passed to int(). int() expects integer number (i.e. '4096') to be passed.
tuned: Exception in thread Thread-2:
tuned: Traceback (most recent call last):
tuned: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
tuned: self.run()
tuned: File "/usr/lib64/python2.7/threading.py", line 764, in run
tuned: self.__target(*self.__args, **self.__kwargs)
tuned: File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 98, in _thread_code
tuned: self._unit_manager.start_tuning()
tuned: File "/usr/lib/python2.7/site-packages/tuned/units/manager.py", line 81, in start_tuning
tuned: instance.apply_tuning()
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/instance/instance.py", line 54, in apply_tuning
tuned: self._plugin.instance_apply_tuning(self)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 191, in instance_apply_tuning
tuned: self._instance_apply_static(instance)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 228, in _instance_apply_static
tuned: self._execute_all_device_commands(instance, instance.devices)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 347, in _execute_all_device_commands
tuned: self._execute_device_command(instance, command, device, new_value)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 410, in _execute_device_command
tuned: command["set"](new_value, device, sim = False)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 312, in _set_readahead
tuned: val = self._parse_ra(value)
tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_disk.py", line 303, in _parse_ra
tuned: v = int(val[0])
tuned: ValueError: invalid literal for int() with base 10: '>4096'
Environment
- Red Hat Enterprise Linux 7.2
- tuned-2.5.1-4.el7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.