Bug 717607 - Provide native systemd unit file
Summary: Provide native systemd unit file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Vcelak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 714443 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-29 11:15 UTC by Jóhann B. Guðmundsson
Modified: 2013-03-04 01:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-20 13:34:08 UTC
Type: ---


Attachments (Terms of Use)
Native systemd service file for tuned (314 bytes, text/plain)
2011-06-29 11:18 UTC, Jóhann B. Guðmundsson
no flags Details
resivit systemd service skipped ! and call uname directly (299 bytes, text/plain)
2011-06-29 15:31 UTC, Jóhann B. Guðmundsson
no flags Details

Description Jóhann B. Guðmundsson 2011-06-29 11:15:02 UTC
Description of problem:

https://fedoraproject.org/wiki/Features/SysVtoSystemd

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jóhann B. Guðmundsson 2011-06-29 11:18:13 UTC
Created attachment 510439 [details]
Native systemd service file for tuned

ktune probably needs to be rework/split into tiny script which then are called by the service

Comment 2 Jan Vcelak 2011-06-29 11:26:52 UTC
I will check if s390 detection works as before. Maybe tuned-adm will need some tuning. Thank you!

Comment 3 Jan Vcelak 2011-06-29 11:27:10 UTC
*** Bug 714443 has been marked as a duplicate of this bug. ***

Comment 4 Jan Vcelak 2011-06-29 15:17:28 UTC
(In reply to comment #1)
> Created attachment 510439 [details]
> Native systemd service file for tuned

This will not work as it is.

1.) ExecStartPre= does not support '!' (easy to resolve by adding '-v' to grep)
2.) tuned relies on initscripts when creating the PID file (can be fixed easily)
3.) on s390, we need zero exit code when service start is invoked (this will be tricky)

Comment 5 Jóhann B. Guðmundsson 2011-06-29 15:31:18 UTC
Created attachment 510488 [details]
resivit systemd service skipped ! and call uname directly

I dont know where my head was at when I put bash infront of uname there

Comment 6 Jóhann B. Guðmundsson 2011-06-29 15:44:51 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > Created attachment 510439 [details]
> > Native systemd service file for tuned
> 
> This will not work as it is.
> 
> 1.) ExecStartPre= does not support '!' (easy to resolve by adding '-v' to grep)

Hum was pretty sure it did but you are right. 

> 2.) tuned relies on initscripts when creating the PID file (can be fixed
> easily)

you should take alook at http://0pointer.de/blog/projects/socket-activation.html and see if you cant make it socketactivated

> 3.) on s390, we need zero exit code when service start is invoked (this will be
> tricky)

Not following here why is this necessary..

    if uname -p | grep -q '^s390x\?$'; then
        echo $"Not starting tuned (no need on s390/s390x architecture)."
        exit 0
    fi

Why does not the admin/installer and what not disable the service if the intention is not to run it?

Comment 7 Jan Vcelak 2011-06-29 18:13:51 UTC
(In reply to comment #6)
> > 2.) tuned relies on initscripts when creating the PID file (can be fixed
> > easily)

This is not true, tuned creates the PID file itself. Sorry for confusing.

However our forking seems not to be entirely correct. I encountered race condition with systemd. Sometimes it killed the whole process group. This fix is prerequisite for tuned.service:

http://git.fedorahosted.org/git/?p=tuned.git;a=commit;h=185baab

> > 3.) on s390, we need zero exit code when service start is invoked (this will be
> > tricky)
> 
> Not following here why is this necessary..
> 
>     if uname -p | grep -q '^s390x\?$'; then
>         echo $"Not starting tuned (no need on s390/s390x architecture)."
>         exit 0
>     fi
> 
> Why does not the admin/installer and what not disable the service if the
> intention is not to run it?

This is because of tuned-adm. Never mind, I will figure out some solution.

Comment 8 Fedora Admin XMLRPC Client 2012-03-20 10:09:48 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


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