Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError is raised in cpu plugin if no devices match #166

Open
olysonek opened this issue Mar 6, 2019 · 0 comments
Open

IndexError is raised in cpu plugin if no devices match #166

olysonek opened this issue Mar 6, 2019 · 0 comments

Comments

@olysonek
Copy link
Contributor

olysonek commented Mar 6, 2019

Consider the following profile:

[cpu]
devices=foobar

The devices option doesn't match any CPUs. If you run tuned with this profile, you'll get an IndexError:

Traceback (most recent call last):
  File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.7/site-packages/tuned/daemon/daemon.py", line 132, in _thread_code
    self._unit_manager.create(self._profile.units)
  File "/usr/lib/python3.7/site-packages/tuned/units/manager.py", line 70, in create
    plugin.initialize_instance(new_instance)
  File "/usr/lib/python3.7/site-packages/tuned/plugins/base.py", line 112, in initialize_instance
    self._instance_init(instance)
  File "/usr/lib/python3.7/site-packages/tuned/plugins/plugin_cpu.py", line 121, in _instance_init
    instance._first_device = list(instance.devices)[0]
IndexError: list index out of range
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

No branches or pull requests

1 participant