Bug 1465011

Summary: glusterfind: DELETE path needs to be unquoted before further processing
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Milind Changire <mchangir>
Component: glusterfindAssignee: Milind Changire <mchangir>
Status: CLOSED ERRATA QA Contact: Anil Shah <ashah>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, rhinduja, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: Regression
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: 3.3.0-devel-freeze-exception
Fixed In Version: glusterfs-3.8.4-32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1465024 (view as bug list) Environment:
Last Closed: 2017-09-21 05:02: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: 1465024    
Bug Blocks: 1417151    

Description Milind Changire 2017-06-26 12:27:48 UTC
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 Atin Mukherjee 2017-06-27 06:59:08 UTC
upstream patch : https://review.gluster.org/17629

Comment 5 Atin Mukherjee 2017-06-30 08:24:07 UTC
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/110578/

Comment 7 Anil Shah 2017-07-05 10:52:01 UTC
[root@rhs-arch-srv1 changelogs]# glusterfind create s1 newvolume
Session s1 created with volume newvolume
[root@rhs-arch-srv1 changelogs]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
   s1                        newvolume                 2017-07-05 09:47:04   

[root@rhs-arch-srv1 changelogs]# glusterfind pre s1 newvolume /tmp/s1.log
Generated output file /tmp/s1.log

[root@rhs-arch-srv1 changelogs]# glusterfind post s1 newvolume 
Session s1 with volume newvolume updated

[root@rhs-arch-srv1 changelogs]# glusterfind pre s1 newvolume /tmp/s1.log
Generated output file /tmp/s1.log


[root@rhs-arch-srv1 changelogs]# cat /tmp/s1.log 
DELETE dir1%2Fdir2%2Fdir3%2Ffile

bug verified on build glusterfs-3.8.4-32.el7rhgs.x86_64

Comment 9 errata-xmlrpc 2017-09-21 05:02:13 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.

https://access.redhat.com/errata/RHBA-2017:2774