Bug 1215547 - '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: 3.7.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Atin Mukherjee
QA Contact:
URL:
Whiteboard: glusterd
Depends On: 1211132
Blocks: glusterfs-3.7.0
TreeView+ depends on / blocked
 
Reported: 2015-04-27 05:32 UTC by Atin Mukherjee
Modified: 2015-05-14 17:35 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.7.0beta1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1211132
Environment:
Last Closed: 2015-05-14 17:27:26 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Atin Mukherjee 2015-04-27 05:32:59 UTC
+++ This bug was initially created as a clone of Bug #1211132 +++

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

--- Additional comment from Anand Avati on 2015-04-14 02:16:38 EDT ---

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)

--- Additional comment from Anand Avati on 2015-04-21 04:49:26 EDT ---

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)

--- Additional comment from Anand Avati on 2015-04-27 01:17:45 EDT ---

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 1 Anand Avati 2015-04-27 05:33:22 UTC
REVIEW: http://review.gluster.org/10398 (glusterd: incorrect rsp.op_ret handling in volume get in cli) posted (#1) for review on release-3.7 by Atin Mukherjee (amukherj)

Comment 2 Anand Avati 2015-04-27 07:36:11 UTC
REVIEW: http://review.gluster.org/10398 (glusterd: incorrect rsp.op_ret handling in volume get in cli) posted (#2) for review on release-3.7 by Niels de Vos (ndevos)

Comment 3 Anand Avati 2015-04-28 08:54:22 UTC
COMMIT: http://review.gluster.org/10398 committed in release-3.7 by Krishnan Parthasarathi (kparthas) 
------
commit 3cce15950d6bdf426751f3b2dc91c72ba55cc036
Author: Atin Mukherjee <amukherj>
Date:   Mon Apr 13 10:37:55 2015 +0530

    glusterd: incorrect rsp.op_ret handling in volume get in cli
    
    Cherry picked from commit 540fc2829bd63a2fa070c68ed105eb23145df406:
    > 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>
    
    Change-Id: Iabe99c06166578fc90121e7cfdca4a6a3f5328ae
    BUG: 1215547
    Signed-off-by: Atin Mukherjee <amukherj>
    Reviewed-on: http://review.gluster.org/10398
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: NetBSD Build System
    Tested-by: Gluster Build System <jenkins.com>

Comment 4 Niels de Vos 2015-05-14 17:27:26 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 5 Niels de Vos 2015-05-14 17:28:48 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 6 Niels de Vos 2015-05-14 17:35:20 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[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.