Bug 1319649

Summary: libglusterfs : glusterd was not restarting after setting key=value length beyond PATH_MAX (4096) character
Product: [Community] GlusterFS Reporter: Gaurav Kumar Garg <ggarg>
Component: libglusterfsclientAssignee: Gaurav Kumar Garg <ggarg>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: amukherj, annair, bkunal, bugs, byarlaga, cbuissar, ggarg, sankarshan, smohan, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1271150 Environment:
Last Closed: 2016-04-19 07:00:16 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: 1271150    
Bug Blocks:    

Comment 1 Vijay Bellur 2016-03-21 09:26:41 UTC
REVIEW: http://review.gluster.org/13795 (libglusterfs: pass buffer size to gf_store_read_and_tokenize function) posted (#1) for review on release-3.7 by Gaurav Kumar Garg (ggarg)

Comment 2 Vijay Bellur 2016-03-23 18:18:40 UTC
REVIEW: http://review.gluster.org/13795 (libglusterfs: pass buffer size to gf_store_read_and_tokenize function) posted (#2) for review on release-3.7 by Niels de Vos (ndevos)

Comment 3 Vijay Bellur 2016-03-23 20:41:36 UTC
COMMIT: http://review.gluster.org/13795 committed in release-3.7 by Niels de Vos (ndevos) 
------
commit 12861b75dcc2319067cabc903e688b4ceb4763fe
Author: Gaurav Kumar Garg <garg.gaurav52>
Date:   Tue Oct 13 14:40:55 2015 +0530

    libglusterfs: pass buffer size to gf_store_read_and_tokenize function
    
    This patch is backport of: http://review.gluster.org/#/c/12346/
    
    Previously if user set an option where length of key=value goes beyond
    PATH_MAX (4096) character then tokenzing the option at the time of
    reading configuration file will fail.
    This is because of the we was having restraction in fgets to read maximum
    of PATH_MAX (4096) length of character.
    Consequence of this is when user try to restart glusterd, after setting
    key=value length beyond PATH_MAX (4096) character, glusterd will not restart.
    
    With this fix instead of PATH_MAX, consumer of gf_store_read_and_tokenize
    function will decide the size of the buffer length.
    
    Cherry picked from commit 816ca94f5dd49f34f395caf501de3c71f0ba113d:
      >> Change-Id: I655a8ce982effdfff8f3e785ea31f543dbe39301
      >> BUG: 1271150
      >> Signed-off-by: Gaurav Kumar Garg <ggarg>
      >> Reviewed-on: http://review.gluster.org/12346
      >> Tested-by: NetBSD Build System <jenkins.org>
      >> Tested-by: Gluster Build System <jenkins.com>
      >> Reviewed-by: Anand Nekkunti <anekkunt>
      >> Reviewed-by: Niels de Vos <ndevos>
    
    Change-Id: I5b76e81a4ad31a286fb4298ba27f3230fba99ab4
    BUG: 1319649
    Signed-off-by: Gaurav Kumar Garg <ggarg>
    Reviewed-on: http://review.gluster.org/13795
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>
    Smoke: Gluster Build System <jenkins.com>

Comment 4 Kaushal 2016-04-19 07:00:16 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.10, please open a new bug report.

glusterfs-3.7.10 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2016-April/026164.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user