Description of problem: unable to create a new volume when the brick path (excluding the ip or hostname) is longer than 32chars; an error is displayed in the cli: brick path 10.35.102.17:/var/lib/share/rhosqe-jenkins-b532dbb1-16-cinder_gluster_2014_02_28_3_29_49_493172 is too long. Version-Release number of selected component (if applicable): glusterfs-server-3.4.0.44rhs-1.el6rhs.x86_64 Steps to Reproduce: 1. gluster create volume volumename ip:/path/longer/than/32/chars Additional info: the actual volume name can be longer than 32, this problem is only affecting the brick path name; I'd expect the brick path name to be allowed up to _POSIX_PATH_MAX
Please note with the current design of volfile it can not be guaranteed that volname and brickpath can have upto _POSIX_PATH_MAX characters. The validation goes like : strlen(volname) + strlen(brickpath) + strlen(hostname/ip) <= _POSIX_PATH_MAX.
Hi Giulio, I am trying to understand why this is a blocker. Is it only set to keep the BZ in radar for the ongoing release? Thanks
RCA --- While creating a volume and adding a brick validation for _POSIX_PATH_MAX is done on absolute pathname instead of relative pathname due to which a brickpath having less than _POSIX_PATH_MAX may also fail the validation if the directory length is greater than (_POSIX_PATH_MAX -strlen(brickpath/volume name). Also this fix addresses one cli response message correction which says the volume file is too long instead of brick path is too long (when brickpath length validation doesn't fail and vol file length validation fails.) It is also important to note that with the current design of volfile naming, it can not be guranteed that volname and brickpath can have max of _POSIX_PATH_MAX characters. Upstream patch http://review.gluster.org/7420 has been back ported in downstream to address this issue.
Setting flags required to add BZs to RHS 3.0 Errata
Tested on glusterfs 3.6.0.16 I see appropriate messages when the file names are long.
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/RHEA-2014-1278.html