Bug 1500508

Summary: no clear indication of profile activation error
Product: Red Hat Enterprise Linux 7 Reporter: Luiz Capitulino <lcapitulino>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: jeder, jskarvad
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-13 13:52:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1240765    

Description Luiz Capitulino 2017-10-10 19:18:08 UTC
Description of problem:

When a profile's script.sh fails, all tuned will do is print an error message in tuned.log, for example:

2017-10-06 16:32:06,798 ERROR    tuned.plugins.plugin_script: script '/usr/lib/tuned/realtime-virtual-host/script.sh' error: 1, ''

However, everything else will indicate that the profile has been successfuly applied. For example, "systemctl status tuned" will say tuned is running fine and "tuned-adm active" will show the profile is applied.

While the error message in tuned.log is necessary, we need a stronger indication that the profile is not applied. This could be systemctl status saying tuned was not loaded or tuned-adm active indicating an error.

Also, note that tuned.log may have unharmful error messages, such as:

2017-10-10 15:05:21,233 ERROR    tuned.utils.commands: Executing sysctl error: sysctl: cannot stat /proc/sys/kernel/numa_balancing: No such file or directory

Which is fine and expected in the RT kernel since numa balancing is disabled, but makes it very hard to distinguish between harmful and unharmful messages.

Version-Release number of selected component (if applicable): tuned-2.8.0-5.el7.noarch


How reproducible:


Steps to Reproduce:
1. Edit a profile's script.sh file and add a "return 1" from the start() function
2. Apply the profile
3. Check, systemctl status tuned, tuned-adm active. All will indicate the profile was successfuly applied

Comment 2 Luiz Capitulino 2017-10-13 13:52:19 UTC
While reviewing profile BZs I found we already have an older BZ open for this issue.

*** This bug has been marked as a duplicate of bug 1385838 ***