Bug 1201294

Summary: tools/glusterfind: Output format flexibility
Product: [Community] GlusterFS Reporter: Aravinda VK <avishwan>
Component: glusterfindAssignee: Aravinda VK <avishwan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: avishwan, bugs, gluster-bugs, khiremat, sanandpa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-27 08:08:54 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:    
Bug Blocks: 1219955    

Description Aravinda VK 2015-03-12 13:24:12 UTC
Description of problem:
Some tools expects Number of letters before the path names. If a filename includes newline character it is difficult for consumer to distinguish two files.

For example,

15 hello_world.txt
5  d1/f1

Additional info:
Feature patch: http://review.gluster.org/#/c/9682/

Comment 1 Anand Avati 2015-03-26 12:42:11 UTC
REVIEW: http://review.gluster.org/10012 (tools/glusterfind: Output Format Configurable) posted (#1) for review on master by Aravinda VK (avishwan)

Comment 2 Aravinda VK 2015-04-27 04:33:48 UTC
Above mentioned patch is Abandoned. Below patch standardizes the output format. It is easy to postprocess from this format and convert it to required format.
http://review.gluster.org/#/c/10320/

Example to convert it to required format.(First argument is filename generated by glusterfind --full

#!/usr/bin/python
import sys
import urllib

filename = sys.argv[1]

with open(filename) as f:
    for line in f:
        line = urllib.unquote_plus(line)
        print "%s %s" % (len(line), line)

Comment 3 Aravinda VK 2015-05-27 08:08:54 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.0, please open a new bug report.