Bug 1465024

Summary: glusterfind: DELETE path needs to be unquoted before further processing
Product: [Community] GlusterFS Reporter: Milind Changire <mchangir>
Component: glusterfindAssignee: Milind Changire <mchangir>
Status: CLOSED CURRENTRELEASE QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, ashah, avishwan, bugs, khiremat, rhs-bugs, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.12.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1465011 Environment:
Last Closed: 2017-09-05 17:35:13 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: 1465011    

Description Milind Changire 2017-06-26 12:48:51 UTC
+++ This bug was initially created as a clone of Bug #1465011 +++

Description of problem:
path collected for UNLINK/RMDIR operations is not correctly unquoted, this causes the '%2F' character sequence quoted as '%252F'

Version-Release number of selected component (if applicable):
glusterfs-3.8.4-28
(probably earlier versions as well)

How reproducible:
100%


Steps to Reproduce:
1. create glusterfind session on any volume type
2. create file dir1/dir2/dir3/file1.txt at mount point
3. wait for changelog to roll-over
4. run glusterfind pre without --no-encode to list the NEW entry
5. run glusterfind post
6. delete dir1/dir2/dir3/file1.txt
7. wait for changelog to roll-over
8. run glusterfind pre without --no-encode to list the DELETE entry

Actual results:
entry will be seen as
DELETE dir1%252Fdir2%252Fdir3%252Ffile1.txt


Expected results:
DELETE dir1%2Fdir2%2Fdir3%2Ffile1.txt

Additional info:

Comment 1 Worker Ant 2017-06-26 12:53:54 UTC
REVIEW: https://review.gluster.org/17629 (tools/glusterfind: unquote DELETE path before further processing) posted (#1) for review on master by Milind Changire (mchangir)

Comment 2 Worker Ant 2017-06-30 07:40:55 UTC
COMMIT: https://review.gluster.org/17629 committed in master by Aravinda VK (avishwan) 
------
commit d95535bae2d200c2210feac7568b1fdbf6f545a9
Author: Milind Changire <mchangir>
Date:   Mon Jun 26 18:20:23 2017 +0530

    tools/glusterfind: unquote DELETE path before further processing
    
    Problem:
    DELETE path is quoted before it reaches glusterfind. This wasn't handled
    in the glusterfind code leading to double quoting of path separator
    '%2F' to '%252F' i.e. the '%' character in '%2F' itself was quoted to
    '%25'
    
    Solution:
    unquote the the deleted path before further processing
    
    Change-Id: I2dfbbd7792dc0f9da5c8e02093b0f1c031ff344a
    BUG: 1465024
    Signed-off-by: Milind Changire <mchangir>
    Reviewed-on: https://review.gluster.org/17629
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Aravinda VK <avishwan>

Comment 3 Shyamsundar 2017-09-05 17:35:13 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.12.0, please open a new bug report.

glusterfs-3.12.0 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] http://lists.gluster.org/pipermail/announce/2017-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/