Bug 1427759 - nfs-ganesha: Incorrect error message returned when disable fails
Summary: nfs-ganesha: Incorrect error message returned when disable fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.10
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Jiffin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: glusterfs-3.10.2
TreeView+ depends on / blocked
 
Reported: 2017-03-01 06:24 UTC by Jiffin
Modified: 2017-05-31 20:45 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.10.2
Clone Of: 1427452
Environment:
Last Closed: 2017-05-31 20:45:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jiffin 2017-03-01 06:24:36 UTC
+++ This bug was initially created as a clone of Bug #1427452 +++

Description of problem:

At times. running "gluster nfs-ganesha disable" fails with below error message -

]# gluster nfs-ganesha disable
Disabling NFS-Ganesha will tear down entire ganesha cluster across the trusted pool. Do you still want to continue?
 (y/n) y
This will take a few minutes to complete. Please wait ..
nfs-ganesha: failed: nfs-ganesha is already (null)d.
# 


Here in the above error message, instead of "disabled" the string contains "(null)d". Jiffin and myself found that this issue happens mostly when this command was run without enabling nfs-ganesha global option even once in the storage pool setup.

The issue is with de-referencing NULL string in glusterd_op_stage_set_ganesha()  when priv->opts dict doesn't contain global key.

Version-Release number of selected component (if applicable):
3.10

How reproducible:
Fairly

Steps to Reproduce:
1. On a fresh setup, without enabling NFS-Ganesha, try running disable command.

Actual results:
The error message contain invalid string.

Expected results:
The error message should be proper.

Comment 1 Worker Ant 2017-03-01 06:42:23 UTC
REVIEW: https://review.gluster.org/16791 (glusterd/ganesha : throw proper error for "gluster nfs-ganesha disable") posted (#2) for review on release-3.10 by jiffin tony Thottan (jthottan)

Comment 3 Worker Ant 2017-04-19 13:35:39 UTC
REVIEW: https://review.gluster.org/16791 (glusterd/ganesha : throw proper error for "gluster nfs-ganesha disable") posted (#3) for review on release-3.10 by jiffin tony Thottan (jthottan)

Comment 4 Worker Ant 2017-04-21 09:29:21 UTC
REVIEW: https://review.gluster.org/16791 (glusterd/ganesha : throw proper error for "gluster nfs-ganesha disable") posted (#4) for review on release-3.10 by jiffin tony Thottan (jthottan)

Comment 5 Worker Ant 2017-04-24 10:32:23 UTC
COMMIT: https://review.gluster.org/16791 committed in release-3.10 by Kaleb KEITHLEY (kkeithle) 
------
commit 6026944157798e0aca087a540776c0701ab0ced6
Author: jiffin tony thottan <jthottan>
Date:   Mon Dec 7 14:38:54 2015 +0530

    glusterd/ganesha : throw proper error for "gluster nfs-ganesha disable"
    
    For first time or if "gluster nfs-ganesha enable" fails the global option
    "nfs-ganesha" won't be stored in glusterd's dictionary. In both cases the
    "gluster nfs-ganesha disable" throws following error :
    "nfs-ganesha: failed: nfs-ganesha is already (null)d."
    
    Also this patch provides the missing prompt for nfs-ganesha disable in 3.10
    
    Change-Id: I7c9fd6dabedc0cfb14c5190b3554bc63a6bc0340
    BUG: 1427759
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: https://review.gluster.org/16791
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: soumya k <skoduri>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 6 Raghavendra Talur 2017-05-31 20:45:17 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.10.2, please open a new bug report.


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