+++ 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>
Downstream review at https://code.engineering.redhat.com/gerrit/#/c/10189/
Moving priority to 'high' as it would crash the process. Patch merged into 'rhs-2.1' branch.
[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
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