----- Original Message -----
Steps to reproduce :
============
1. yum install tuned.
2. yum install tuned-profiles-cpu-partitioning.noarch
3. tuned-adm profile cpu-partitioning
4. tuned-adm verify -i
Verification failed, current system settings differ from the preset profile.
You can mostly fix this by Tuned restart, e.g.:
service tuned restart
Sometimes (if some plugins like bootloader are used) also reboot is required.
See tuned log file ('/var/log/tuned/tuned.log') for details.
Python traces are logged in /var/log/tuned/tuned.log file
INFO tuned.plugins.plugin_script: calling script
'/usr/lib/tuned/cpu-partitioning/script.sh' with arguments
'['verify',
'ignore_missing']'
ERROR tuned.plugins.plugin_script: script
'/usr/lib/tuned/cpu-partitioning/script.sh' error: 1, 'Traceback (most
recent call last):
File "/usr/libexec/tuned/defirqaffinity.py", line 102, in <module>
verify(mask)
File "/usr/libexec/tuned/defirqaffinity.py", line 64, in verify
interruptdirs.remove("2")
ValueError: list.remove(x): x not in list'
ERROR tuned.plugins.plugin_script: verify: failed:
'[u'/usr/lib/tuned/cpu-partitioning/script.sh']'
If the value 2 is not in the list, call interruptdirs.remove("2") will throw
ValueError: list.remove(x): x not in list'.
Fix the code to properly handle ValueError.
Signed-off-by: Seeteena Thoufeek <s1seetee(a)linux.vnet.ibm.com>
---
libexec/defirqaffinity.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/libexec/defirqaffinity.py b/libexec/defirqaffinity.py
index 6be06aa..d8910e8 100755
--- a/libexec/defirqaffinity.py
+++ b/libexec/defirqaffinity.py
@@ -61,10 +61,15 @@ def verify(shouldbemask):
# now verify each /proc/irq/$num/smp_affinity
interruptdirs = [ f for f in os.listdir(irqpath) if
os.path.isdir(os.path.join(irqpath,f)) ]
# IRQ 2 - cascaded signals from IRQs 8-15 (any devices configured to use
IRQ 2 will actually be using IRQ 9)
- interruptdirs.remove("2")
+ try:
+ interruptdirs.remove("2")
+ except ValueError:
+ pass
# IRQ 0 - system timer (cannot be changed)
- interruptdirs.remove("0")
-
+ try:
+ interruptdirs.remove("0")
+ except ValueError:
+ pass
for i in interruptdirs:
inplacemask = 0
fname = irqpath + i + "/smp_affinity"
--
1.8.3.1
_______________________________________________
power-management mailing list -- power-management(a)lists.fedoraproject.org
To unsubscribe send an email to
power-management-leave(a)lists.fedoraproject.org
Hi,
thanks. I applied it upstream:
https://github.com/redhat-performance/tuned/commit/0a01874fc51440894d165f...
Please for future contributions keep the coding style (i.e. tabs vs spaces),
I fixed it by the following commit:
https://github.com/redhat-performance/tuned/commit/ebf3132e58b47c8e4695ab...
I also extended the exception handler to other places:
https://github.com/redhat-performance/tuned/commit/ffd26efd4835a9ba134cae...
thanks & regards
Jaroslav