Bug 840736 - tuned don't execute script.sh
tuned don't execute script.sh
Product: Fedora
Classification: Fedora
Component: tuned (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-17 02:39 EDT by Daniel Rindt
Modified: 2013-02-14 04:31 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-14 04:31:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/etc/tuned/new-x900/tuned.conf (154 bytes, application/octet-stream)
2012-07-17 02:39 EDT, Daniel Rindt
no flags Details

  None (edit)
Description Daniel Rindt 2012-07-17 02:39:48 EDT
Created attachment 598563 [details]

Description of problem:
I let /usr/bin/powertop2tuned create some scripts for tuned to save energy. But when tuned is started the script.sh is not executed.

Version-Release number of selected component (if applicable):
[drindt@localhost ~]$ rpm -qa|grep tune

How reproducible:

Steps to Reproduce:
1. run /usr/bin/powertop2tuned
2. activate the newly generated profile
3. reload tuned
Actual results:
script.sh is not executed

Expected results:
script.sh should be executed
Comment 1 gdelx001 2012-08-12 14:59:41 EDT
I suspect this is related to what I found when creating a custom profile by hand including a script in /etc/tuned/<profile directory>, since that is also where powertop2tuned purports to place the profile it creates.

The problem in my case appears to be the SELinux targeted policy insists on labeling the file as it appears in /etc as unconfined_u which stops tuned from running it.  Strongarming the context (via chcon) to have system_u allows tuned to run it (at least for me).  Of course, unless the SELinux policy filecontexts are updated, this will eventually revert and the problem will return.  And I'm not sure that's the appropriate context fix either - just that it works.

If this is the same for the powertop2tuned result, then maybe this bug should be refiled/modified as a SELinux targeted policy bug as then it wouldn't be the fault of tuned.
Comment 2 Fedora Admin XMLRPC Client 2013-02-04 16:45:04 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Jaroslav Škarvada 2013-02-14 04:31:47 EST
Thanks for reporting thus bug. The problem seems already fixed in recent selinux-policy.

$ ls -Z /etc/tuned/new-x900/script.sh
-rwxr-xr-x. root root unconfined_u:object_r:tuned_etc_t:s0 /etc/tuned/new-x900/script.sh

And the commands in /etc/tuned/new-x900/script.sh are executed for me, package versions:

Thus I am closing this bug. If the problem persist feel free to reopen.

Note You need to log in before you can comment on or make changes to this bug.