Bug 983966

Summary: cli crashes when setting diagnostics.client-log-level is set to trace
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ravishankar N <ravishankar>
Component: glusterfsAssignee: Ravishankar N <ravishankar>
Status: CLOSED ERRATA QA Contact: Gowrishankar Rajaiyan <grajaiya>
Severity: low Docs Contact:
Priority: high    
Version: 2.1CC: amarts, gluster-bugs, grajaiya, rhs-bugs, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0.12rhs.beta5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 982174 Environment:
Last Closed: 2013-09-23 22:35:54 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: 982174    
Bug Blocks:    

Description Ravishankar N 2013-07-12 12:10:50 UTC
+++ This bug was initially created as a clone of Bug #982174 +++

Description of problem:
CLI crashes when diagnostics.client-log-level is incorrectly set to 'trace' instead of 'TRACE'

How reproducible:
Always

Steps to Reproduce:
1. gluster volume set <volname> diagnostics.client-log-level trace

Actual results:
segfault

Expected results: The message:
"volume set: failed: option log-level trace: 'trace' is not valid(possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)"

--- Additional comment from Anand Avati on 2013-07-08 06:44:35 EDT ---

REVIEW: http://review.gluster.org/5298 (cli: check for null in is_server_debug_xlator()) posted (#1) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Anand Avati on 2013-07-11 08:53:34 EDT ---

REVIEW: http://review.gluster.org/5298 (cli: check for null in is_server_debug_xlator()) posted (#2) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Anand Avati on 2013-07-12 00:59:56 EDT ---

REVIEW: http://review.gluster.org/5298 (cli: check for null in is_server_debug_xlator()) posted (#3) for review on master by Ravishankar N (ravishankar)

--- Additional comment from Anand Avati on 2013-07-12 07:14:49 EDT ---

COMMIT: http://review.gluster.org/5298 committed in master by Vijay Bellur (vbellur) 
------
commit 07833f13d43a3e3532171bb2edbe068e3a7205b1
Author: Ravishankar N <ravishankar>
Date:   Mon Jul 8 15:45:54 2013 +0530

    cli: check for null in is_server_debug_xlator()
    
    Command: gluster volume set <volname> diagnostics.client-log-level trace
    Expected output:
    "volume set: failed: option log-level trace: 'trace' is not valid
    (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE,
    TRACE.)"
    Current output: gluster cli receives a segmentation fault
    Fix: check for NULL before calling strstr
    
    Change-Id: If4c7a85a635849a388cf122543e12349c109643c
    BUG: 982174
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/5298
    Reviewed-by: Kaushal M <kaushal>
    Tested-by: Gluster Build System <jenkins.com>

Comment 2 Ravishankar N 2013-07-12 12:29:27 UTC
Downstream review at https://code.engineering.redhat.com/gerrit/#/c/10189/

Comment 3 Amar Tumballi 2013-07-15 05:47:40 UTC
Moving priority to 'high' as it would crash the process. Patch merged into 'rhs-2.1' branch.

Comment 4 Gowrishankar Rajaiyan 2013-08-02 05:30:56 UTC
[root@dhcp201-183 ~]# for i in debug warning error info critical none trace; do gluster volume set fsync diagnostics.client-log-level $i; done
volume set: failed: option log-level debug: 'debug' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level warning: 'warning' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level error: 'error' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level info: 'info' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level critical: 'critical' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level none: 'none' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
volume set: failed: option log-level trace: 'trace' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
[root@dhcp201-183 ~]# 



No crash detected.
Verified. Build: glusterfs-server-3.4.0.13rhs-1.el6rhs.x86_64

Comment 5 Scott Haines 2013-09-23 22:35:54 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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html