Bug 764019 - (GLUSTER-2287) Gluster CLI returns wrong return code.
Gluster CLI returns wrong return code.
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
All Windows
low Severity low
: ---
: ---
Assigned To: Pranith Kumar K
Depends On:
  Show dependency treegraph
Reported: 2011-01-10 17:57 EST by Piotr Kandziora
Modified: 2011-05-04 04:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: RTP
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Piotr Kandziora 2011-01-10 15:02:22 EST
Correct script output in first case (I have replaced manually volume name):

root@adam-dev:~# gluster volume info notexistent
Volume notexistent not present
root@adam-dev:~# echo $?
Comment 1 Piotr Kandziora 2011-01-10 17:57:17 EST
Gluster CLI command returns wrong return code in case of giving not existent volume as a parameter for 'gluster volume info'. Example below:

root@adam-dev:~# gluster volume info notexistent
Volume sdfdsfds not present
root@adam-dev:~# echo $?

Correct return code should be 255 (as in exemplary output):

root@adam-dev:~# gluster volume reset notextistent
reset volume unsuccessful
Error while resetting options
root@adam-dev:~# echo $?
Comment 2 Anand Avati 2011-01-26 23:42:11 EST
PATCH: http://patches.gluster.com/patch/5980 in master (cli: return error when cmd execution fails)
Comment 3 Raghavendra Bhat 2011-02-17 22:05:09 EST
Now gluster volume info on a non existing volume gives nonzero return value.

root@bigbang:/home/raghu# gluster volume info iii
Volume iii does not exist
root@bigbang:/home/raghu# echo $?

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