Bug 1211132 - 'volume get' invoked on a non-existing key fails with zero as a return value
Summary: 'volume get' invoked on a non-existing key fails with zero as a return value
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Atin Mukherjee
QA Contact: SATHEESARAN
URL:
Whiteboard: glusterd
Depends On:
Blocks: 1215547
TreeView+ depends on / blocked
 
Reported: 2015-04-13 06:10 UTC by SATHEESARAN
Modified: 2016-06-16 12:49 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1215547 (view as bug list)
Environment:
Last Closed: 2016-06-16 12:49:31 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description SATHEESARAN 2015-04-13 06:10:43 UTC
Description of problem:
-----------------------
'volume get' invoked on a non-existing key returns zero as a return value

Version-Release number of selected component (if applicable):
--------------------------------------------------------------
glusterfs-3.7 nightly build

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Try to get the value of the non-existing key on the volume

(i.e) gluster volume get <vol-name> mykey

Actual results:
---------------
return value ($?) is 0

Expected results:
-----------------
return value should be non-zero, indicating the failure as the key is non-existent

Additional info:
-----------------
[root@ ~]# gluster volume get repvol mykey
volume get option: failed: Did you mean acl or allow?

[root@ ~]# echo $?
0

This affects automation - where the return value of the command will be checked for the successful execution of a command

Comment 1 Anand Avati 2015-04-14 06:16:38 UTC
REVIEW: http://review.gluster.org/10229 (glusterd: incorrect rsp.op_ret handling in volume get in cli) posted (#1) for review on master by Atin Mukherjee (amukherj)

Comment 2 Anand Avati 2015-04-21 08:49:26 UTC
REVIEW: http://review.gluster.org/10229 (glusterd: incorrect rsp.op_ret handling in volume get in cli) posted (#3) for review on master by Atin Mukherjee (amukherj)

Comment 3 Anand Avati 2015-04-27 05:17:45 UTC
COMMIT: http://review.gluster.org/10229 committed in master by Kaushal M (kaushal) 
------
commit 540fc2829bd63a2fa070c68ed105eb23145df406
Author: Atin Mukherjee <amukherj>
Date:   Mon Apr 13 10:37:55 2015 +0530

    glusterd: incorrect rsp.op_ret handling in volume get in cli
    
    Change-Id: Iabe99c06166578fc90121e7cfdca4a6a3f5328ae
    BUG: 1211132
    Signed-off-by: Atin Mukherjee <amukherj>
    Reviewed-on: http://review.gluster.org/10229
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaushal M <kaushal>

Comment 4 Nagaprasad Sathyanarayana 2015-10-25 14:43:11 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 5 Nagaprasad Sathyanarayana 2015-10-25 14:53:48 UTC
Fix for this bug is already made in a GlusterFS release. The cloned BZ has details of the fix and the release. Hence closing this mainline BZ.

Comment 6 Niels de Vos 2016-06-16 12:49:31 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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