Bug 523385

Summary: initscript collected problems LSB-compilant tuned service
Product: [Fedora] Fedora Reporter: Jan Ščotka <jscotka>
Component: tunedAssignee: Petr Lautrbach <plautrba>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: mmaslano, pknirsch, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-25 10:50:40 UTC Type: ---
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: 521669    

Description Jan Ščotka 2009-09-15 09:52:54 UTC
There are some problems with LSB-compilants of initscript against
https://fedoraproject.org/wiki/Packaging/SysVInitScript definition.

service: tuned

I've created some test and there is output of run (PASS menas that it started correctly, FAIL, that there is some problem with returncode, explanaition in brackets):

:: [   LOG    ] :: >>>>>>>>> service start
:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command 
:: [   PASS   ] ::  Already started service 
:: [   PASS   ] ::  Again status command 
:: [   LOG    ] :: >>>>>>>>> service restart
:: [   PASS   ] ::  Restarting of service
:: [   PASS   ] ::  Status command 
:: [   LOG    ] :: >>>>>>>>> service stop
:: [   PASS   ] ::  Stopping service 
:: [   PASS   ] ::  Status of stopped service 
:: [   PASS   ] ::  Stopping service again 
:: [   PASS   ] ::  Status of stopped service 
:: [   LOG    ] :: >>>>>>>>> pid file
:: [   FAIL   ] :: File /var/run/tuned.pid should exist 
:: [   PASS   ] :: Running 'echo 666666 > /var/run/tuned.pid'
:: [   PASS   ] ::  Existing pid file, but service not started 
:: [   LOG    ] :: >>>>>>>>> lock file
:: [   PASS   ] :: File /var/lock/subsys/tuned should exist
:: [   PASS   ] :: Running 'touch /var/lock/subsys/tuned'
:: [   PASS   ] ::  Existing lock file, but service not started 
:: [   LOG    ] :: >>>>>>>>> insufficient rights
:: [   PASS   ] ::  Starting service for restarting under nonpriv user 
:: [   FAIL   ] :: Insufficient rights, restarting resrvice under nonprivileged user must fail (Expected 4, got 1)
:: [   LOG    ] :: >>>>>>>>> operations
:: [   PASS   ] ::  Service have to implement start function 
:: [   PASS   ] ::  Service have to implement restart function 
:: [   PASS   ] ::  Service have to implement status function 
:: [   FAIL   ] ::  Service have to implement usage function  (Expected 0, got 2)
:: [   PASS   ] ::  Service have to implement condrestart function 
:: [   PASS   ] ::  Service have to implement try-restart function 
:: [   PASS   ] ::  Service have to implement reload function 
:: [   PASS   ] ::  Service have to implement force-reload function 
:: [   LOG    ] :: >>>>>>>>> nonexist operations
:: [   PASS   ] ::  Testing proper return code when nonexisting function
:: [   LOG    ] :: >>>>>>>>> invalid arguments
:: [   PASS   ] ::  When no arguments added to service, it must fail with proper return code 


There are some problems:
* there should be pid file (is required by LSB) and then return proper code
* when user have insufficinet rights it must return code 4
* there should be implemented function usage

Comment 1 Petr Lautrbach 2009-09-16 20:28:41 UTC
fix pushed to upstream

Comment 2 Petr Lautrbach 2009-09-21 14:34:21 UTC
fixed version pushed to rawhide  http://koji.fedoraproject.org/koji/taskinfo?taskID=1694805

all tests passed, only pid file test needs some sleep after 'service tuned start'