Details
Description
cbstats will exit with zero status even when there are serious problems. It seems like having sys.exit(1) in some spots where there is currently only a sys.exit() might help?
Example:
[cb1]$ /opt/couchbase/bin/cbstats cb2.local:11210 all ; echo $?
|
accepting_conns: 1
|
auth_cmds: 0
|
...
|
0
|
Then stop cb2:
[cb2]$ sudo service couchbase-server stop
|
and try again:
[cb1]$ /opt/couchbase/bin/cbstats cb2.local:11210 all ; echo $?
|
Stats '' are not available from the requested engine. ([Errno 32] Broken pipe)
|
0
|
The expectation is that there be a non-zero result code in cases like the above example.
Thanks!