Bug 521246 - Make irqbalance init script LSB compliant
Summary: Make irqbalance init script LSB compliant
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: irqbalance
Version: 12
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-04 13:48 UTC by Evan McNabb
Modified: 2010-12-05 06:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-05 06:29:22 UTC


Attachments (Terms of Use)
Init script patch (767 bytes, patch)
2009-09-04 13:52 UTC, Evan McNabb
no flags Details | Diff

Description Evan McNabb 2009-09-04 13:48:27 UTC
Description of problem:

Overall, the irqbalance init script follows the LSB guidelines outlined on https://fedoraproject.org/wiki/FCNewInit/Initscripts

However, I noticed a few things that may need to be fixed:

1) It states "The start, stop, restart, force-reload, and status actions shall be supported by all init scripts". The force-reload option is currently not available:

# service irqbalance force-reload
Usage: /etc/init.d/irqbalance {start|stop|status|restart|reload|condrestart}

2) If the irqbalance daemon is dead then the service won't start (because the /var/run/irqbalance.pid still exists). For example,

# service irqbalance status
irqbalance (pid  7730) is running...
# killall -9 irqbalance
# service irqbalance start
Starting irqbalance:                                       [  OK  ]
[root@localhost init.d]# service irqbalance status
irqbalance dead but pid file exists
[root@localhost init.d]# ps aux |grep irqbalance
root      7791  0.0  0.1  89080   792 pts/5    S+   09:39   0:00 grep irqbalance

3) I don't believe it currently handles all of the following:

================
In case of an error while processing any init-script action except for status, the init script shall print an error message and exit with a non-zero status code:
    * 1 generic or unspecified error (current practice)
    * 2 invalid or excess argument(s)
    * 3 unimplemented feature (for example, "reload")
    * 4 user had insufficient privilege
    * 5 program is not installed
    * 6 program is not configured
    * 7 program is not running 
. . .
================

Version-Release number of selected component (if applicable):
irqbalance-0.55-18.fc12.x86_64

I'm attaching a patch which should fix problems #1 and #2.

Comment 2 Evan McNabb 2009-09-04 13:52:34 UTC
Created attachment 359812 [details]
Init script patch

Comment 3 Neil Horman 2009-09-04 15:51:35 UTC
The fix for 1 is fine

2 isnt really a bug, as LSB just mandates 'sane behavior'.  I think reporting the bad state is 'sane'  Also, removing the pid file like that messes up the desired behavior of the oneshot flag.

3 isnt really a bug either, as we lump all errors in under the 'generic' code.  Expanding out the other codes, isn't really a big value add in my eyes unless there is a specific need.  If you have one we can certainly look at it, but Id rather avoid it if we could.

Comment 4 Evan McNabb 2009-09-04 17:14:19 UTC
Thanks Neil.

Makes sense about removing the pid file. The reason I pointed it out was that when you try to start the service when irqbalance is dead (and the pid file exists), is it says that irqbalance has started "[ OK ]" but it really hasn't. This could cause a user to think it's running but it's actually not. Perhaps it could print an error message or show "[FAILED]"?

About #3, I agree that the generic code currently in place should be sufficient.

Comment 5 Bug Zapper 2009-11-16 11:58:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2010-11-04 10:12:42 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2010-12-05 06:29:22 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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