Description of problem: Like how there are accepted conventions for password, or for creating a file, or for a volume name, similarly there must be accepted values for a session name. When a glusterfind session is created with random name having special characters, it fails with an unrelated error - '10.70.42.202 - create failed: percent_expand: unknown key %#' and this fails at every node (of the cluster) where it tries to create a session entry, thereby multiple errors are displayed on the screen. Ideally, whenever a glusterfind CLI is given with a session name/volume name - it should do the checks in the following order: 1. Check if the names specified in the command, fall under the valid/accepted names or not. 2. If (1) is YES, go ahead and check if the session/volume already exists or not If (1) is NO, stop right there and error out telling 'invalid name given for volume/session', and save the time/cycles spent in going ahead with the OP at every peer of the cluster. Version-Release number of selected component (if applicable): glusterfs-3.7.1-4.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1. Have a >2 node cluster, with volume 'vol1'. 2. Create a glusterfind session for 'vol1' with the session name as special characters Actual results: Step2 fails with the below error: [root@dhcp43-191 ~]# [root@dhcp43-191 ~]# glusterfind create ^%#@* ozone 10.70.42.202 - create failed: percent_expand: unknown key %# 10.70.42.147 - create failed: percent_expand: unknown key %# 10.70.42.202 - create failed: percent_expand: unknown key %# 10.70.42.147 - create failed: percent_expand: unknown key %# 10.70.42.30 - create failed: percent_expand: unknown key %# 10.70.42.30 - create failed: percent_expand: unknown key %# Command create failed in 10.70.42.202:/rhs/thinbrick1/ozone [root@dhcp43-191 ~]# glusterfind list SESSION VOLUME SESSION TIME --------------------------------------------------------------------------- fds ozone 2015-06-22 14:58:44 sesso3 ozone 2015-06-18 16:27:30 sesso1 ozone 2015-06-19 23:20:19 ^%#@* ozone Session Corrupted sesso5 ozone 2015-06-20 00:18:03 fdjksl ozone 2015-06-22 14:58:09 sesso2 ozone 2015-06-19 22:44:40 5543 ozone 2015-06-22 14:59:10 sesso4 ozone 2015-06-18 16:27:38 [root@dhcp43-191 ~]# Expected results: Step2 should have first verified if the session name specified is a valid session name or not. If not, it should have stopped right there, displaying an error 'Session name can have only alphanumeric characters, with _' or something on similar lines.
Patch posted upstream http://review.gluster.org/#/c/11602/
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Validation needs to be added in `mode_create` function in `$SRC/tools/glusterfind/src/main.py`
Patch posted upstream https://review.gluster.org/#/c/glusterfs/+/11602/
(In reply to Shwetha K Acharya from comment #12) > Patch posted upstream https://review.gluster.org/#/c/glusterfs/+/11602/ I assume it can get devel-ack+ now?
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 (glusterfs bug fix and enhancement update), 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-2020:5603