Bug 326281
| Summary: | Wrong return code from init script | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | David Kovalsky <dkovalsk> |
| Component: | tog-pegasus | Assignee: | Vitezslav Crhonek <vcrhonek> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.1 | CC: | benl, mvadkert, syeghiay |
| 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: | 2009-01-20 22:18:57 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: | |||
| Bug Depends On: | 325511 | ||
| Bug Blocks: | |||
|
Description
David Kovalsky
2007-10-10 12:50:44 UTC
.qa.[root@x86_64-5server tps]# rpm -q tog-pegasus tog-pegasus-2.6.1-2.el5.x86_64 tog-pegasus-2.6.1-2.el5.i386 This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Please note this: Pid file and lock file cases are fixed. The first case (when trying stop on already stopped service) will return 0, not 7 as you propose. Zero is right return value here, see: https://bugzilla.redhat.com/show_bug.cgi?id=443010 In case that lock file exists still returns 3 (expected is 2).
Repro steps:
[root@i386-5s-m1 tps]# service tog-pegasus start
[root@i386-5s-m1 tps]# chattr +i /var/run/tog-pegasus/cimserver_start.lock
[root@i386-5s-m1 tps]# service tog-pegasus stop
rm: cannot remove `/var/run/tog-pegasus/cimserver_start.lock': Operation not permitted
[ OK ]
.live.[root@i386-5s-m1 tps]# service tog-pegasus status
CIM server is not running
.live.[root@i386-5s-m1 tps]# echo $?
3
^^^
(In reply to comment #5)
> Please note this:
>
> Pid file and lock file cases are fixed. The first case (when trying stop on
> already stopped service) will return 0, not 7 as you propose. Zero is right
> return value here, see:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=443010
Hm, I checked these files (taken from init script): LOCKFILE=/var/lock/subsys/tog-pegasus PIDFILE=/var/run/tog-pegasus/cimserver.pid After discussion with David, the script should check both lock files. (In reply to comment #8) > Hm, I checked these files (taken from init script): > > LOCKFILE=/var/lock/subsys/tog-pegasus > PIDFILE=/var/run/tog-pegasus/cimserver.pid An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0250.html |