Bug 666991 - standard error code for usage issues should be 2
Summary: standard error code for usage issues should be 2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2-cluster
Version: 5.6
Hardware: All
OS: All
low
low
Target Milestone: rc
: ---
Assignee: Milan Broz
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-04 00:16 UTC by Corey Marthaler
Modified: 2013-03-01 04:10 UTC (History)
12 users (show)

Fixed In Version: lvm2-cluster-2.02.84-2.el5
Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Clone Of:
Environment:
Last Closed: 2011-07-21 07:03:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0986 0 normal SHIPPED_LIVE lvm2-cluster bug fix and enhancement update 2011-07-20 15:45:06 UTC

Description Corey Marthaler 2011-01-04 00:16:41 UTC
Description of problem:
[root@taft-04 ~]# clvmd -s
Usage:
clvmd [Vhd]

   -V       Show version of clvmd
   -h       Show this help information
   -d       Set debug level
            If starting clvmd then don't fork, run in the foreground
   -R       Tell all running clvmds in the cluster to reload their device cache
   -S       Restart clvmd, preserving exclusive locks
   -C       Sets debug level (from -d) on all clvmd instances clusterwide
   -t<secs> Command timeout (default 60 seconds)
   -T<secs> Startup timeout (default none)
   -I<cmgr> Cluster manager (default: auto)
            Available cluster managers: cman
[root@taft-04 ~]# echo $?
0

Version-Release number of selected component (if applicable):
lvm2-2.02.74-5.el5    BUILT: Wed Dec  8 08:12:31 CST 2010
lvm2-cluster-2.02.74-3.el5    BUILT: Tue Nov  9 08:01:59 CST 2010

Comment 1 Alasdair Kergon 2011-01-04 12:00:19 UTC
Well it shouldn't return success in that example!

Need to review all exit points from the code for appropriate status code, make changes where necessary and then document all the ones used in the clvmd man page.

Comment 2 Alasdair Kergon 2011-01-04 12:42:54 UTC
The value 4 added for non-root invocation clashes with a different existing use: the existing one needs to be changed (regression).

Comment 3 RHEL Program Management 2011-01-11 20:25:35 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2011-01-11 23:05:47 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 6 Milan Broz 2011-03-08 13:28:43 UTC
In 2.02.85 upstream.

Comment 7 Milan Broz 2011-03-23 12:18:40 UTC
Fixed in
lvm2-cluster-2.02.84-2.el5

Comment 9 Corey Marthaler 2011-05-11 15:43:27 UTC
Fix verified in in the latest rpms.

[root@taft-01 ~]# clvmd -s
Usage: clvmd [options]
   -V       Show version of clvmd
   -h       Show this help information
   -d[n]    Set debug logging (0:none, 1:stderr (implies -f option), 2:syslog)
   -f       Don't fork, run in the foreground
   -R       Tell all running clvmds in the cluster to reload their device cache
   -S       Restart clvmd, preserving exclusive locks
   -C       Sets debug level (from -d) on all clvmd instances clusterwide
   -t<secs> Command timeout (default 60 seconds)
   -T<secs> Startup timeout (default none)
   -I<cmgr> Cluster manager (default: auto)
            Available cluster managers: cman
[root@taft-01 ~]# echo $?
2

2.6.18-256.el5

lvm2-2.02.84-2.el5    BUILT: Wed Mar 23 07:18:08 CDT 2011
lvm2-cluster-2.02.84-2.el5    BUILT: Wed Mar 23 07:19:43 CDT 2011
device-mapper-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
device-mapper-event-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009

Comment 11 Florian Nadge 2011-05-26 14:50:45 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.

Comment 12 errata-xmlrpc 2011-07-21 07:03:44 UTC
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-2011-0986.html


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