Bug 210455 - clustat always returns with exit code 0
clustat always returns with exit code 0
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: rgmanager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2006-10-12 04:41 EDT by Nils Philippsen
Modified: 2009-04-16 16:21 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0149
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-10 17:18:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch (4.81 KB, patch)
2006-12-05 10:01 EST, Lon Hohberger
no flags Details | Diff
Fix (4.81 KB, patch)
2006-12-05 10:51 EST, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Nils Philippsen 2006-10-12 04:41:15 EDT
Description of problem:

SSIA, when using e.g. "clustat -s <service>", it always returns with exit code 0
regardless of whether the service is running/disabled/failed. This makes using
clustat in scripts more difficult than it had to be.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. "clustat -s <service>
Actual results:
always exit code 0

Expected results:
should only return 0 on success (service is running), should return different
non-zero values for disabled/failed/service unknown/...

Additional info:
Comment 1 Lon Hohberger 2006-10-20 15:16:23 EDT
Would it be sufficient to:

(a) Alter the output (e.g. just display state), and
(b) add a separate command line option to ensure it's a one-shot report?

Currently, you can do things like clustat -i1 -s <foo>.  In that case, the
return code is undefined as the service can transition while clustat is running.
Comment 2 Lon Hohberger 2006-12-05 10:01:22 EST
Created attachment 142851 [details]

Makes clustat return state # if the service is not started/starting/stopping
Comment 3 Lon Hohberger 2006-12-05 10:51:39 EST
Created attachment 142861 [details]
Comment 4 Lon Hohberger 2006-12-13 13:20:13 EST
Fixes in CVS.
Comment 7 Red Hat Bugzilla 2007-05-10 17:18:00 EDT
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 the 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.


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