Bug 521772 - Initscripts for krb5 daemons are not LSB compliant
Summary: Initscripts for krb5 daemons are not LSB compliant
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject 588222
TreeView+ depends on / blocked
 
Reported: 2009-09-08 09:41 UTC by Zbysek MRAZ
Modified: 2013-07-03 13:08 UTC (History)
4 users (show)

Fixed In Version: 1.7-8
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 588222 (view as bug list)
Environment:
Last Closed: 2009-09-14 17:44:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch (964 bytes, patch)
2009-09-08 19:50 UTC, Bill Nottingham
no flags Details | Diff

Description Zbysek MRAZ 2009-09-08 09:41:15 UTC
Version-Release number of selected component (if applicable):
krb5-server-1.7-7.fc12
krb5-libs-1.7-7.fc12
krb5-workstation-1.7-7.fc12
krb5-workstation-servers-1.7-7.fc12
krb5-workstation-clients-1.7-7.fc12


==============================================================
kadmin initscript:
Description of 1st problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts "service XYZ
status" should return 2 when program is dead and /var/lock lock file exists.
kadmind returns 3 (which indicate stopped program with lock/pid cleaned
up)

How reproducible:
always

Steps to Reproduce:
1. service kadmin start
2. killall kadmin
3. service kadmin status ; echo $?
  
Actual results:
kadmind is stopped
3

Expected results:
kadmind dead but subsys locked
2

Description of 2nd problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts 
"For all other init-script actions, the init script shall return an exit status of zero if the action was successful. In addition to straightforward success, the following situations are also to be considered successful:
    * running start on a service already running "

How reproducible:
always

Steps to Reproduce:
1. start kadmin service if it is not already running (service kadmin start)
2. service kadmin start ; echo $?
  
Actual results:
Starting Kerberos 5 Admin Server:            FAILED
kadmin (pid 12345) is running...
1

Expected results:
Starting Kerberos 5 Admin Server:
kadmin (pid 12345) is running...
0


==============================================================
krb5kdc initscript:
Description of problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts 
"For all other init-script actions, the init script shall return an exit status of zero if the action was successful. In addition to straightforward success, the following situations are also to be considered successful:
    * running start on a service already running "

How reproducible:
always

Steps to Reproduce:
1. start krb5kdc service if it is not already running (service krb5kdc start)
2. service krb5kdc start ; echo $?
  
Actual results:
Starting Kerberos 5 KDC:            FAILED
1

Expected results:
Starting Kerberos 5 KDC:
0

==============================================================
kpropd initscript:
Description of 1st problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts "service XYZ
status" should return 2 when program is dead and /var/lock lock file exists.
kpropd returns 0 (which indicate stopped program with lock/pid cleaned
up)

How reproducible:
always

Steps to Reproduce:
1. service kpropd start
2. killall kpropd
3. service kpropd status ; echo $?
  
Actual results:
kpropd is stopped
0

Expected results:
kadmind dead but subsys locked
2

Description of 1st problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts "service XYZ
status" should return 3 when program is not running.
kpropd returns 0 (which indicate stopped program with lock/pid cleaned
up)

How reproducible:
always

Steps to Reproduce:
1. service kadmin stop
2. service kadmin status ; echo $?
  
Actual results:
kpropd is stopped
0

Expected results:
kpropd is stopped
3

Description of 3rd problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts 
"For all other init-script actions, the init script shall return an exit status of zero if the action was successful. In addition to straightforward success, the following situations are also to be considered successful:
    * running start on a service already running "

How reproducible:
always

Steps to Reproduce:
1. start kpropd service if it is not already running (service kpropd start)
2. service kpropd start ; echo $?
  
Actual results:
Starting Kerberos 5 Propagation Server:            FAILED
kpropd (pid 12345) is running...
1

Expected results:
Starting Kerberos 5 Propagation Server:
kpropd (pid 12345) is running...
0

Comment 1 Nalin Dahyabhai 2009-09-08 19:08:37 UTC
The status() function in /etc/init.d/functions assumes that the lock file matches the daemon name rather than the init script name, so we need some help from the initscripts package to fix the first one for kadmin and kprop.  CCing notting.

Fixing the other thing in CVS.

Comment 2 Bill Nottingham 2009-09-08 19:25:25 UTC
If kadmin and kprop have pid files, you can adjust $base and pass -p <pid file name> directly, and things *should* work, from a brief inspection.

Comment 3 Bill Nottingham 2009-09-08 19:50:32 UTC
Created attachment 360125 [details]
patch

Does this work for you?

Comment 4 Nalin Dahyabhai 2009-09-08 19:55:48 UTC
(In reply to comment #3)
> Created an attachment (id=360125) [details]
> patch
> 
> Does this work for you?  

Applying the patch and using the new -l option works nicely, thanks!

Comment 5 Bill Nottingham 2009-09-08 20:27:03 UTC
Added in git.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=8fa3e3bee06cfd628d46855e12b80562645f0319

Will be in 8.99-1. Do I need to build that soon?

Comment 6 Nalin Dahyabhai 2009-09-08 20:56:35 UTC
I can hold off on exercising it / depending on it until you do.

Comment 7 Bill Nottingham 2009-09-14 17:12:35 UTC
8.99-1 built.

Comment 8 Nalin Dahyabhai 2009-09-14 17:44:35 UTC
Excellent, thanks!


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