Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 612097

Summary: cman initscript FedoraGuidelines compliance
Product: Red Hat Enterprise Linux 6 Reporter: Fabio Massimo Di Nitto <fdinitto>
Component: clusterAssignee: Fabio Massimo Di Nitto <fdinitto>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: agk, ccaulfie, cfeist, cluster-maint, dkovalsk, fdinitto, lhh, mbroz, nstraz, rpeterso, swhiteho, syeghiay, teigland
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cluster-3.0.12-10.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 537242 Environment:
Last Closed: 2010-11-10 19:59:33 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: 537242    
Bug Blocks: 633349    
Attachments:
Description Flags
proposed patch none

Description Fabio Massimo Di Nitto 2010-07-07 10:09:35 UTC
+++ This bug was initially created as a clone of Bug #537242 +++

Description of problem:

This is a list of issues for the cman init script when compared with the
criteria in 
https://fedoraproject.org/wiki/Packaging/SysVInitScript


Version-Release number of selected component (if applicable):
cman-3.0.4-1.fc12.i686

 * missing required actions condrestart and try-restart

 * status action returns wrong exit code when cman is not running.  The following exit codes should be used:

    1: program is dead and /var/run pid file exists
    2: program is dead and /var/lock lock file exists
    3: program is not running

 * exit status for unknown and missing arguments should be 2

[root@morph-04 tmp]$ service cman
Usage: /etc/init.d/cman {start|stop|reload|restart|status}
[root@morph-04 tmp]$ echo $?
1
[root@morph-04 tmp]$ service cman wrong
Usage: /etc/init.d/cman {start|stop|reload|restart|status}
[root@morph-04 tmp]$ echo $?
1

--- Additional comment from fedora-triage-list on 2009-11-16 10:29:17 EST ---


This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

--- Additional comment from fdinitto on 2009-11-24 02:42:32 EST ---

Fixed with 506f14733f529f74662f01eef093f60a66dbff1d commit to STABLE3

Comment 1 Fabio Massimo Di Nitto 2010-07-07 10:11:25 UTC
Created attachment 430018 [details]
proposed patch

Further testing revealed 4 more issues in the init script.

The patch addresses them.

Result from the test:

:: [   LOG    ] :: Assertions: 27 good, 0 bad

Comment 2 Fabio Massimo Di Nitto 2010-07-07 10:17:09 UTC
Upstream commit b5d08b299859ddd428e9468cf06b3dac05f9e66e

Comment 5 Nate Straz 2010-07-16 19:57:20 UTC
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Test run ID   : debugging
:: [   LOG    ] :: Package       : cman
:: [   LOG    ] :: Installed:    : cman-3.0.12-13.el6.x86_64
:: [   LOG    ] :: Test started  : 2010-07-16 15:53:00
:: [   LOG    ] :: Test finished : 2010-07-16 15:54:28
:: [   LOG    ] :: Test name     :
:: [   LOG    ] :: Distro:       : Red Hat Enterprise Linux Server release 6.0 )
:: [   LOG    ] :: Hostname      : west-04.lab.bos.redhat.com
:: [   LOG    ] :: Architecture  : x86_64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test description
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Cannot find the PURPOSE file of this test. Could be a missing, or
rlInitializeJournal wasn't called from appropriate location

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: >>>>>>>>> service start
:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command
:: [   PASS   ] ::  Already started service
:: [   PASS   ] ::  Again status command
:: [   LOG    ] :: >>>>>>>>> service restart
:: [   PASS   ] ::  Restarting of service
:: [   PASS   ] ::  Status command
:: [   LOG    ] :: >>>>>>>>> service stop
:: [   PASS   ] ::  Stopping service
:: [   PASS   ] ::  Status of stopped service
:: [   PASS   ] ::  Stopping service again
:: [   PASS   ] ::  Status of stopped service
:: [   LOG    ] :: >>>>>>>>> pid file
:: [   PASS   ] :: File /var/run/cman.pid should exist
:: [   PASS   ] :: Running 'echo 666666 > /var/run/cman.pid'
:: [   PASS   ] ::  Existing pid file, but service not started
:: [   LOG    ] :: >>>>>>>>> lock file
:: [   PASS   ] :: File /var/lock/subsys/cman should exist
:: [   PASS   ] :: Running 'touch /var/lock/subsys/cman'
:: [   PASS   ] ::  Existing lock file, but service not started
:: [   LOG    ] :: >>>>>>>>> insufficient rights
:: [   PASS   ] ::  Starting service for restarting under nonpriv user
:: [   PASS   ] :: Insufficient rights, restarting resrvice under nonprivilegedl
:: [   LOG    ] :: >>>>>>>>> operations
:: [   PASS   ] ::  Service have to implement start function
:: [   PASS   ] ::  Service have to implement restart function
:: [   PASS   ] ::  Service have to implement status function
:: [   PASS   ] ::  Service have to implement condrestart function
:: [   PASS   ] ::  Service have to implement try-restart function
:: [   PASS   ] ::  Service have to implement reload function
:: [   PASS   ] ::  Service have to implement force-reload function
:: [   LOG    ] :: >>>>>>>>> nonexist operations
:: [   PASS   ] ::  Testing proper return code when nonexisting function
:: [   LOG    ] :: >>>>>>>>> invalid arguments
:: [   PASS   ] ::  When no arguments added to service, it must fail with prope
:: [   LOG    ] :: Duration: 1m 28s
:: [   LOG    ] :: Assertions: 27 good, 0 bad
:: [   PASS   ] :: RESULT: Test

Comment 6 releng-rhel@redhat.com 2010-11-10 19:59:33 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.