Bug 953128 - tuned does not start if active profile is missing
Summary: tuned does not start if active profile is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-17 12:23 UTC by Branislav Blaškovič
Modified: 2013-11-12 00:41 UTC (History)
5 users (show)

Fixed In Version: tuned-2.3.0-1.fc20
Clone Of:
Environment:
Last Closed: 2013-11-12 00:41:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Branislav Blaškovič 2013-04-17 12:23:32 UTC
Description of problem:
  If active profile is missing 

Version-Release number of selected component (if applicable):
  tuned-2.2.2-1.1.fc19.noarch

How reproducible:
  always

Steps to Reproduce:
1. powertop2tuned test-profile
2. tuned-adm profile test-profile
3. systemctl stop tuned.service
4. rm -rf /etc/tuned/test-profile
5. systemctl start tuned.service
  
Actual results:

tuned.service - Dynamic System Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/tuned.service; disabled)
   Active: failed (Result: exit-code) since St 2013-04-17 14:16:29 CEST; 42s ago
  Process: 20000 ExecStart=/usr/sbin/tuned -l -P (code=exited, status=1/FAILURE)

apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: File "/usr/lib64/python2.7/logging/handlers.py", line 77, in emit
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: self.doRollover()
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: File "/usr/lib64/python2.7/logging/handlers.py", line 135, in doRollover
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: os.remove(dfn)
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: OSError: [Errno 13] Permission denied: '/var/log/tuned/tuned.log.2'
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: Logged from file loader.py, line 46
apr 17 14:16:29 bblaskov.brq.redhat.com tuned[20000]: Cannot load profile 'test-profile'.
apr 17 14:16:29 bblaskov.brq.redhat.com systemd[1]: tuned.service: main process exited, code=exited, status=1/FAILURE
apr 17 14:16:29 bblaskov.brq.redhat.com systemd[1]: Failed to start Dynamic System Tuning Daemon.
apr 17 14:16:29 bblaskov.brq.redhat.com systemd[1]: Unit tuned.service entered failed state

Comment 1 Branislav Blaškovič 2013-04-17 12:27:06 UTC
Fix for comment #1:

Description of problem:
  If active profile is missing, tuned does not start.

Comment 2 Jan Včelák 2013-04-18 20:50:04 UTC
I just committed a fix to upstream repository:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=780aac2

Comment 3 Jaroslav Škarvada 2013-11-06 15:58:11 UTC
Moving to f20.

Comment 4 Jaroslav Škarvada 2013-11-06 17:03:51 UTC
Well, it is still not optimal, but at least the daemon doesn't crash now (tuned-2.3.0) and tuned-adm can be used to change to some other profile:

2013-11-06 11:51:49,705 ERROR    tuned.daemon.daemon: Cannot load profile 'test'.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 19, in __init__
    self._init_profile(profile_name)
  File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 33, in _init_profile
    self.set_profile(profile_name)
  File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 45, in set_profile
    raise TunedException("Cannot load profile '%s'." % profile_name)
TunedException: Cannot load profile 'test'.
2013-11-06 11:51:49,705 ERROR    tuned.daemon.daemon: Cannot set initial profile. No tunings will be enabled!

# systemctl status tuned
tuned.service - Dynamic System Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled)
   Active: active (running) since St 2013-11-06 11:51:49 EST; 5min ago
 Main PID: 43188 (tuned)
   CGroup: /system.slice/tuned.service
           └─43188 /usr/bin/python -Es /usr/sbin/tuned -l -P

So I am marking this as resolved. I will remove the traceback in the upstream git master. It was there only for debug purposes (log.exception).

Comment 5 Jaroslav Škarvada 2013-11-06 17:06:20 UTC
Upstream commit removing the traceback logging:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=7608f2dc2b84132267fdb7d0455e4eab94df1295

Comment 6 Fedora Update System 2013-11-06 17:56:20 UTC
tuned-2.3.0-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/tuned-2.3.0-1.fc20

Comment 7 Fedora Update System 2013-11-07 19:06:34 UTC
Package tuned-2.3.0-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tuned-2.3.0-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-20857/tuned-2.3.0-1.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-11-12 00:41:39 UTC
tuned-2.3.0-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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