Bug 1465011 - glusterfind: DELETE path needs to be unquoted before further processing
glusterfind: DELETE path needs to be unquoted before further processing
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterfind (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: RHGS 3.3.0
Assigned To: Milind Changire
Anil Shah
3.3.0-devel-freeze-exception
: Regression
Depends On: 1465024
Blocks: 1417151
  Show dependency treegraph
 
Reported: 2017-06-26 08:27 EDT by Milind Changire
Modified: 2017-09-21 01:02 EDT (History)
4 users (show)

See Also:
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 01:02:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milind Changire 2017-06-26 08:27:48 EDT
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 02:59:08 EDT
upstream patch : https://review.gluster.org/17629
Comment 5 Atin Mukherjee 2017-06-30 04:24:07 EDT
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/110578/
Comment 7 Anil Shah 2017-07-05 06:52:01 EDT
[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 01:02:13 EDT
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

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