Bug 737468 - service fcoe status return bad exit code if pid file exists and service not running
Summary: service fcoe status return bad exit code if pid file exists and service not r...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: fcoe-utils
Version: 6.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Petr Šabata
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-12 08:39 UTC by Miroslav Vadkerti
Modified: 2011-09-12 14:03 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-12 14:03:55 UTC


Attachments (Terms of Use)

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.


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