Bug 737468

Summary: service fcoe status return bad exit code if pid file exists and service not running
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Vadkerti <mvadkert>
Component: fcoe-utilsAssignee: Petr Šabata <psabata>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 6.2Keywords: Regression
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-12 14:03:55 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:

Description Miroslav Vadkerti 2011-09-12 08:39:27 UTC
Description of problem:
Our test /CoreOS/fcoe-utils/Sanity/init-scripts-LSB is failing with the latest package. The problem is that the status command returns bad error code [1] if pid file exists:

# service fcoe stop
Stopping FCoE initiator service:                           [  OK  ]
# touch /var/run/fcoe.pid
# service fcoe status
/usr/sbin/fcoemon -- UNUSED
No interfaces created.
# echo $?
3

https://fedoraproject.org/wiki/Packaging/SysVInitScript#Exit_Codes_for_the_Status_Action

This is a REGRESSION as with the RHEL6.1 package I cannot reproduce this problem.

Version-Release number of selected component (if applicable):
fcoe-utils-1.0.20-2.el6

How reproducible:
100%

Steps to Reproduce:
1. see description
  
Actual results:
return code 3

Expected results:
return code 1

Additional info:
[1] https://fedoraproject.org/wiki/Packaging/SysVInitScript#Exit_Codes_for_the_Status_Action

Comment 1 Petr Šabata 2011-09-12 12:38:43 UTC
(In reply to comment #0)
> Description of problem:
> Our test /CoreOS/fcoe-utils/Sanity/init-scripts-LSB is failing with the latest
> package. The problem is that the status command returns bad error code [1] if
> pid file exists:
> 
> # service fcoe stop
> Stopping FCoE initiator service:                           [  OK  ]
> # touch /var/run/fcoe.pid

The service uses /var/run/fcoemon.pid as its PID file, defined online 33.
There's a check on line 168.  Do you get the correct code with this?

Comment 2 Miroslav Vadkerti 2011-09-12 14:03:55 UTC
After discussion this is not a bug. The service is called fcoe but the underlying daemon is fcoemon. The pid file gets name from the daemon. We decided not to fix this inconsistency (i.e. service should be called as the daemon) to not break possible customer usages.