Bug 612097 - cman initscript FedoraGuidelines compliance
cman initscript FedoraGuidelines compliance
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster (Show other bugs)
6.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Fabio Massimo Di Nitto
Cluster QE
:
Depends On: 537242
Blocks: 633349
  Show dependency treegraph
 
Reported: 2010-07-07 06:09 EDT by Fabio Massimo Di Nitto
Modified: 2010-11-10 14:59 EST (History)
13 users (show)

See Also:
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 14:59:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed patch (931 bytes, patch)
2010-07-07 06:11 EDT, Fabio Massimo Di Nitto
no flags Details | Diff

  None (edit)
Description Fabio Massimo Di Nitto 2010-07-07 06:09:35 EDT
+++ 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@redhat.com 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@redhat.com on 2009-11-24 02:42:32 EST ---

Fixed with 506f14733f529f74662f01eef093f60a66dbff1d commit to STABLE3
Comment 1 Fabio Massimo Di Nitto 2010-07-07 06:11:25 EDT
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 06:17:09 EDT
Upstream commit b5d08b299859ddd428e9468cf06b3dac05f9e66e
Comment 5 Nate Straz 2010-07-16 15:57:20 EDT
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   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 14:59:33 EST
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.

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