Bug 670106

Summary: krb5 initscripts regression
Product: Red Hat Enterprise Linux 6 Reporter: Zbysek MRAZ <zmraz>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: dpal, ebenes, jplans, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-18 15:15:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zbysek MRAZ 2011-01-17 08:26:40 UTC
Description of problem:
there is change in status codes for krb5kdc and kadmin
Results from 6.0
:: [   LOG    ] :: Lock file
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'kill -n 9 25399'
:: [   PASS   ] :: Running 'service kadmin status'
:: [   PASS   ] :: Running 'service kadmin stop'
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: Lock file


And from 6.1 (krb5 1.9-1):

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Lock file
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'kill -n 9 6413'
:: [   FAIL   ] :: Running 'service krb5kdc status' (Expected 2, got 1)
:: [   PASS   ] :: Running 'service krb5kdc stop'
:: [   LOG    ] :: Duration: 3s
:: [   LOG    ] :: Assertions: 2 good, 1 bad
:: [   FAIL   ] :: RESULT: Lock file


Version-Release number of selected component (if applicable):
krb5-server-1.9-1.el6

How reproducible:
always

Steps to Reproduce:
1. kill -n 9 $(pidof ${SERVICE})
2. service ${SERVICE} status

  
Actual results:
service krb5kdc status; echo $?
krb5kdc dead but pid file exists
1

Expected results:
service krb5kdc status; echo $?
krb5kdc dead but pid file exists
2

Comment 1 Nalin Dahyabhai 2011-01-17 16:41:26 UTC
The two runs appear to have tested different things.  What happened with the krb5kdc init script on 6.0?

Comment 2 Nalin Dahyabhai 2011-01-17 20:27:28 UTC
(In reply to comment #0)
> Description of problem:
> there is change in status codes for krb5kdc and kadmin
> Results from 6.0
> :: [   LOG    ] :: Lock file
> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> 
> :: [   PASS   ] :: Running 'kill -n 9 25399'
> :: [   PASS   ] :: Running 'service kadmin status'
> :: [   PASS   ] :: Running 'service kadmin stop'
> :: [   LOG    ] :: Duration: 1s
> :: [   LOG    ] :: Assertions: 3 good, 0 bad
> :: [   PASS   ] :: RESULT: Lock file
> 
> 
> And from 6.1 (krb5 1.9-1):
> 
> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> :: [   LOG    ] :: Lock file
> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> 
> :: [   PASS   ] :: Running 'kill -n 9 6413'
> :: [   FAIL   ] :: Running 'service krb5kdc status' (Expected 2, got 1)
> :: [   PASS   ] :: Running 'service krb5kdc stop'
> :: [   LOG    ] :: Duration: 3s
> :: [   LOG    ] :: Assertions: 2 good, 1 bad
> :: [   FAIL   ] :: RESULT: Lock file
> 
> 
> Version-Release number of selected component (if applicable):
> krb5-server-1.9-1.el6
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. kill -n 9 $(pidof ${SERVICE})
> 2. service ${SERVICE} status
> 
> 
> Actual results:
> service krb5kdc status; echo $?
> krb5kdc dead but pid file exists
> 1
> 
> Expected results:
> service krb5kdc status; echo $?
> krb5kdc dead but pid file exists
> 2

Can you double-check that the expected error message is about the pid file, and not about the subsys being locked?

When I try this manually with 1.8.2-3.el6_0.3, I get exit status 2 with a "process dead but subsys locked" error message.  In 1.9, where we start being able to tell krb5kdc and kadmind to create pid files, I do get an exit status of 1 and a "process dead but pid file exists error", which I guess is normal, because when there's a dead process, the status function checks for the existence of the pid file first.

Comment 3 Zbysek MRAZ 2011-01-18 15:15:16 UTC
You have right. My test was counting with nonexistence of pid files. The kadmin and krb5kdc scripts are behaving correctly. Even better now, when there is the pid file with the number of correct process.