Bug 1527063

Summary: missing quotes (filenames with spaces) get-gfid.sh generate-gfid-file.sh
Product: [Community] GlusterFS Reporter: stephen.remde
Component: scriptsAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.13CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description stephen.remde 2017-12-18 13:02:15 UTC
Description of problem:

Scripts dont quote filenames so filenames with spaces fail.

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

ALL


How reproducible:

Easily

Steps to Reproduce:
1. Create a mount with a filename containing a space "./path/file name.txt"
2. Run generate-gfid-file.sh on it

Actual results:

getfattr: ./path/file: No such file or directory
getfattr: name.txt: No such file or directory

Expected results:

Script runs as normal

Additional info:

https://github.com/gluster/glusterfs/blob/master/extras/geo-rep/generate-gfid-file.sh#L9

Reads 

    find "$DIR_PATH" -exec $GET_GFID_CMD {} \; >> $OUTPUT_FILE

Should be

    find "$DIR_PATH" -exec $GET_GFID_CMD "{}" \; >> $OUTPUT_FILE


https://github.com/gluster/glusterfs/blob/master/extras/geo-rep/get-gfid.sh#L3

Reads

ATTR_STR=`getfattr -h $1 -n glusterfs.gfid.string`

Should be

ATTR_STR=`getfattr -h "$1" -n glusterfs.gfid.string`

Comment 1 Shyamsundar 2018-06-20 18:28:11 UTC
This bug reported is against a version of Gluster that is no longer maintained (or has been EOL'd). See https://www.gluster.org/release-schedule/ for the versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline gluster repository, request that it be reopened and the Version field be marked appropriately.

Comment 2 Shyamsundar 2018-06-20 18:28:12 UTC
This bug reported is against a version of Gluster that is no longer maintained
(or has been EOL'd). See https://www.gluster.org/release-schedule/ for the
versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline
gluster repository, request that it be reopened and the Version field be marked
appropriately.