Red Hat Bugzilla – Bug 210455
clustat always returns with exit code 0
Last modified: 2009-04-16 16:21:12 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):
Steps to Reproduce:
1. "clustat -s <service>
always exit code 0
should only return 0 on success (service is running), should return different
non-zero values for disabled/failed/service unknown/...
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.
Created attachment 142851 [details]
Makes clustat return state # if the service is not started/starting/stopping
Created attachment 142861 [details]
Fixes in CVS.
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.