Bug 717607

Summary: Provide native systemd unit file
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: tunedAssignee: Jan Vcelak <jvcelak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: h.reindl, jvcelak, pknirsch, tsmetana, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-20 13:34:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Native systemd service file for tuned
none
resivit systemd service skipped ! and call uname directly none

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.