Bug 521772 - Initscripts for krb5 daemons are not LSB compliant
Initscripts for krb5 daemons are not LSB compliant
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: krb5 (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Nalin Dahyabhai
Fedora Extras Quality Assurance
:
Depends On:
Blocks: InitScriptsProject 588222
  Show dependency treegraph
 
Reported: 2009-09-08 05:41 EDT by Zbysek MRAZ
Modified: 2013-07-03 09:08 EDT (History)
4 users (show)

See Also:
Fixed In Version: 1.7-8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 588222 (view as bug list)
Environment:
Last Closed: 2009-09-14 13:44:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Zbysek MRAZ 2009-09-08 05:41:15 EDT
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 15:08:37 EDT
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 15:25:25 EDT
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 15:50:32 EDT
Created attachment 360125 [details]
patch

Does this work for you?
Comment 4 Nalin Dahyabhai 2009-09-08 15:55:48 EDT
(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 16:27:03 EDT
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 16:56:35 EDT
I can hold off on exercising it / depending on it until you do.
Comment 7 Bill Nottingham 2009-09-14 13:12:35 EDT
8.99-1 built.
Comment 8 Nalin Dahyabhai 2009-09-14 13:44:35 EDT
Excellent, thanks!

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