Bug 1071377 - [NeedInfo] volume creation fails with "brick path is too long" in weird circumstances
Summary: [NeedInfo] volume creation fails with "brick path is too long" in weird circu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.0
Hardware: x86_64
OS: Unspecified
low
medium
Target Milestone: ---
: RHGS 3.0.0
Assignee: Atin Mukherjee
QA Contact: Sachidananda Urs
URL:
Whiteboard:
Depends On:
Blocks: 1085330
TreeView+ depends on / blocked
 
Reported: 2014-02-28 15:48 UTC by Giulio Fidente
Modified: 2015-05-13 16:57 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.6.0.3-1.el6rhs
Doc Type: Bug Fix
Doc Text:
* If length of the volume name exceeds 256 chars following error message should be thrown by gluster CLI: Volume name exceeds 256 characters. Usage: volume create <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT>] [transport <tcp|rdma|tcp,rdma>] <NEW-BRICK>... [force] * If gluster volume info is executed with a volume name containing more than 256 characters following error message should be thrown: Invalid volume name Getting Volume information failed! * If any of the brick sub folders is more than 256 characters in the brick path then the following error message will be thrown: brick path <brick path> is too long. * If brick vol file length is more than 256 characters then the following error message will be thrown: Volume file path for volume <vol name> and brick path <brick path> is too long
Clone Of:
: 1085330 (view as bug list)
Environment:
Last Closed: 2014-09-22 19:34:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1278 0 normal SHIPPED_LIVE Red Hat Storage Server 3.0 bug fix and enhancement update 2014-09-22 23:26:55 UTC

Description Giulio Fidente 2014-02-28 15:48:57 UTC
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

Comment 4 Atin Mukherjee 2014-04-08 11:58:22 UTC
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.

Comment 5 Nagaprasad Sathyanarayana 2014-04-14 12:21:06 UTC
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

Comment 7 Atin Mukherjee 2014-05-19 09:43:42 UTC
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.

Comment 8 Nagaprasad Sathyanarayana 2014-05-19 10:56:32 UTC
Setting flags required to add BZs to RHS 3.0 Errata

Comment 10 Sachidananda Urs 2014-06-13 07:29:15 UTC
Tested on glusterfs 3.6.0.16
I see appropriate messages when the file names are long.

Comment 12 errata-xmlrpc 2014-09-22 19:34:09 UTC
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


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