Bug 1427452

Summary: nfs-ganesha: Incorrect error message returned when disable fails
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Soumya Koduri <skoduri>
Component: glusterdAssignee: Jiffin <jthottan>
Status: CLOSED ERRATA QA Contact: surabhi <sbhaloth>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, asoman, asrivast, rhinduja, rhs-bugs, storage-qa-internal, vbellur
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.8.4-24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1427759 (view as bug list) Environment:
Last Closed: 2017-09-21 04:33:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1417147    

Description Soumya Koduri 2017-02-28 09:17:38 UTC
Description of problem:

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

[root@gqas009 ganesha]# 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.
[root@gqas009 ganesha]# 


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.2

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.

Additional info:

Comment 3 Jiffin 2017-04-19 13:35:31 UTC
Patch posted upstream for review https://review.gluster.org/#/c/16791/

Comment 6 surabhi 2017-04-28 10:44:12 UTC
Verified with latest build.
Execute nfs-ganesha disable for the first time without enabling and it dows not give the error message as nulld as it was giving before.

 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 disabled.


Now it gives proper error message.

Marking the BZ verified.

nfs-ganesha-2.4.4-4.el7rhgs.x86_64
glusterfs-ganesha-3.8.4-24.el7rhgs.x86_64
nfs-ganesha-gluster-2.4.4-4.el7rhgs.x86_64

Comment 8 errata-xmlrpc 2017-09-21 04:33:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2774

Comment 9 errata-xmlrpc 2017-09-21 04:57:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2774