Bug 813937 - Format of auth.allow option string causes glusterfsd to crash
Format of auth.allow option string causes glusterfsd to crash
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: access-control (Show other bugs)
3.3-beta
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Kaushal
Shwetha Panduranga
:
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-04-18 15:49 EDT by Harry Mangalam
Modified: 2015-12-01 11:45 EST (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:10:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Harry Mangalam 2012-04-18 15:49:48 EDT
Description of problem:
The option string:
gluster volume set gli auth.allow '10.255.77.*, 128.200.15.*, 10.255.78.*, 10.255.89.*'
is accepted by gluster, but results in glusterfsd crashing with the following error:
[2012-04-18 12:00:06.462434] I [glusterfsd.c:1627:main] 0-/usr/sbin/glusterfsd: Started running /usr/sbin/glusterfsd version 3.3.0beta3
[2012-04-18 12:00:06.484066] E [graph.y:374:yyerror] 0-parser: syntax error: line 44 (volume 'gli-server'): "128.200.15.*,"
allowed tokens are 'volume', 'type', 'subvolumes', 'option', 'end-volume'()
[2012-04-18 12:00:06.484183] E [glusterfsd.c:1512:glusterfs_process_volfp] 0-: failed to construct the graph
[2012-04-18 12:00:06.484463] W [glusterfsd.c:793:cleanup_and_exit] (-->/usr/lib/libgfrpc.so.0(rpc_clnt_handle_reply+0xa5) [0x7f9681b80905] (-->/usr/sbin/glusterfsd(mgmt_getspec_cbk+0xe0) [0x4
0c090] (-->/usr/sbin/glusterfsd(glusterfs_process_volfp+0x198) [0x405da8]))) 0-: received signum (0), shutting down

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

How reproducible:
it fails all times when use that string.  
If use:
gluster volume set gli auth.allow '*.*.*.*'
or
gluster volume set gli auth.allow '10.255.77.*'

glusterfsd starts.

If use 2 or more IP# sets, it also fails

if use commas to separate the IP#s, also fails


Steps to Reproduce:
1. create a gluster volume (gli in the below example)
2. gluster volume set gli auth.allow '10.255.77.*, 10.255.78.*'
3. gluster volume start gli
4. check 'gluster volume status'
  
Actual results:
gluster volume status

Status of volume: gli
Gluster process                                         Port    Online  Pid
------------------------------------------------------------------------------
Brick pbs1ib:/bducgl                                    24016   N       N/A
Brick pbs2ib:/bducgl                                    24023   N       N/A
Brick pbs2ib:/bducgl1                                   24025   N       N/A
Brick pbs3ib:/bducgl                                    24016   N       N/A
Brick pbs4ib:/bducgl                                    24016   N       N/A
NFS Server on localhost                                 38467   N       N/A
NFS Server on pbs4ib                                    38467   N       N/A
NFS Server on pbs3ib                                    38467   N       N/A
NFS Server on pbs2ib                                    38467   N       N/A


Expected results:

# gluster volume status

Status of volume: gli
Gluster process                                         Port    Online  Pid
------------------------------------------------------------------------------
Brick pbs1ib:/bducgl                                    24016   Y       25628
Brick pbs2ib:/bducgl                                    24023   Y       2403
Brick pbs2ib:/bducgl1                                   24025   Y       2409
Brick pbs3ib:/bducgl                                    24016   Y       9131
Brick pbs4ib:/bducgl                                    24016   Y       20542
NFS Server on localhost                                 38467   N       N/A
NFS Server on pbs4ib                                    38467   N       N/A
NFS Server on pbs3ib                                    38467   N       N/A
NFS Server on pbs2ib                                    38467   N       N/A

Additional info:
Didn't want or expect the NFS server to start
Comment 1 Anand Avati 2012-04-20 12:32:26 EDT
CHANGE: http://review.gluster.com/3192 (cli: Strip whitespace from "volume set" option values) merged in master by Vijay Bellur (vijay@gluster.com)
Comment 2 Shwetha Panduranga 2012-04-25 05:28:41 EDT
Verified the bug on 3.3.0qa38. bug is fixed.

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