Bug 1263095 - [BACKUP]: Output file for delete is misleading with the additional character %25
Summary: [BACKUP]: Output file for delete is misleading with the additional character %25
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfind
Version: rhgs-3.1
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Aravinda VK
QA Contact: Sweta Anandpara
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-15 06:42 UTC by Rahul Hinduja
Modified: 2018-03-07 14:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-07 14:07:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Rahul Hinduja 2015-09-15 06:42:59 UTC
Description of problem:
=======================

When we generate output file we convert "/" to %2F which is correctly working incase of NEW as:

[root@georep1 ~]# cat rh5.txt
NEW %2Fmnt%2Fglusterfs%2Ftesting
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Fa
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.1
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.9
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.6
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.2
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ff8
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ff9

But incase of delete we add %252F for "/" as:


[root@georep1 ~]# cat rh6.txt
DELETE %2Fmnt%2Fglusterfs%2Ftesting%252Ffile.9
DELETE %2Fmnt%2Fglusterfs%2Ftesting%252Ff9
[root@georep1 ~]#

If you consume these log file for backup, the deletes will not provide the actual path and it will error as "no such file or directory"

Example for conversion:
=======================

bash-4.3$ python
Python 2.7.8 (default, Apr 15 2015, 09:26:43) 
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> li = [urllib.unquote('%2Fmnt%2Fglusterfs%2Ftesting%252Ffile.9')]
>>> li
['/mnt/glusterfs/testing%2Ffile.9']
>>> li = [urllib.unquote_plus('%2Fmnt%2Fglusterfs%2Ftesting%252Ffile.9')]
>>> li
['/mnt/glusterfs/testing%2Ffile.9']
>>> li = [urllib.unquote_plus('%2Fmnt%2Fglusterfs%2Ftesting%2Ffile.9')]
>>> li
['/mnt/glusterfs/testing/file.9']
>>> 


The convention used for NEW entry is successfully converted into path, but the convention used for DELETE needs to unquote twice to get the list. 


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

glusterfs-3.7.1-14.el7rhgs.x86_64


How reproducible:
=================

Always


Steps to Reproduce:
===================
1. Create glusterfind session
2. Create directory and file inside it
3. Generate output file {glusterfind pre}
4. Glusterfind post
5. Delete the file created at step 2
6. Generate output file {glusterfind pre}
7. Observe the convention used for NEW at step 3 vs DELETE at step 6

Actual results:
For NEW:
=======
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.9

For DELETE:
===========
DELETE %2Fmnt%2Fglusterfs%2Ftesting%252Ffile.9


Expected results:

For NEW:
=======
NEW %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.9

For DELETE:
===========
DELETE %2Fmnt%2Fglusterfs%2Ftesting%2Ffile.9


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