Bug 1233147 - [Backup]: Rename and simultaneous movement of a hardlink logs an incorrect entry of RENAME
Summary: [Backup]: Rename and simultaneous movement of a hardlink logs an incorrect en...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfind
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHGS 3.1.0
Assignee: Milind Changire
QA Contact: Sweta Anandpara
URL:
Whiteboard:
Depends On:
Blocks: 1202842 1223636
TreeView+ depends on / blocked
 
Reported: 2015-06-18 10:31 UTC by Sweta Anandpara
Modified: 2016-09-17 15:19 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.7.1-8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-29 05:06:04 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 0 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 08:26:26 UTC

Description Sweta Anandpara 2015-06-18 10:31:48 UTC
Description of problem:
In a >2 node cluster, with a volume and corresponding glusterfind sessions for the same, a newly created hardlink under a directory is logged in as a NEW entry. When the hardlink file is renamed and moved to its parent directory, it ends up logging a RENAME entry with the old name as the parent name.

Version-Release number of selected component (if applicable):
glusterfs-3.7.1-3.el6rhs.x86_64

How reproducible: Always


Steps to Reproduce:
1. Have a >2 node cluster, with volume 'vol1' and glusterfind session created 'vol1s1'
2. Create a directory 'dir1' and file 'file1'
3. Run glusterfind pre and post and verify that there are two NEW entries logged in teh outfile
4. At the mountpoint, create a hardlink 'linkfile1' to 'file1'
ln dir1/file1 dir1/linkfile1
5. Again run glusterfind pre and post and verify a new entry is created for 'linkfile1'
6. Change the permission of the link file and renaem and move the linked file to its parent directory
chmod 755 dir1/linkfile1
mv dir1/linkfile1 ../linkfile2
7. Run glusterfind pre and post and verify the outfile


Actual results:

MODIFY dir1%2Ffile1 
RENAME dir1%2Ffile1 linkfile2


Expected results:

MODIFY dir1%2Ffile1 
RENAME dir1%2Flinkfile1 linkfile2


Additional info:

#########   SERVER   ############

[root@dhcp43-93 ~]# glusterfind pre vol1s1 vol1 /tmp/outv1.txt 
Generated output file /tmp/outv1.txt
[root@dhcp43-93 ~]# cat /tmp/outv1.txt 
[root@dhcp43-93 ~]# glusterfind pre vol1s1 vol1 /tmp/outv1.txt --regenerate-outfile
Generated output file /tmp/outv1.txt
[root@dhcp43-93 ~]# cat /tmp/outv1.txt 
NEW dir1%2F%2Flinkfile1 
[root@dhcp43-93 ~]# glusterfind post vol1s1 vol1
Session vol1s1 with volume vol1 updated
[root@dhcp43-93 ~]# glusterfind pre vol1s1 vol1 /tmp/outv1.txt 
Generated output file /tmp/outv1.txt
[root@dhcp43-93 ~]# cat /tmp/outv1.txt 
MODIFY dir1%2Ffile1 
RENAME dir1%2Ffile1 linkfile2
[root@dhcp43-93 ~]# 
[root@dhcp43-93 ~]# 
[root@dhcp43-93 ~]# rpm -qa | grep glusterfs
glusterfs-api-3.7.1-3.el6rhs.x86_64
glusterfs-libs-3.7.1-3.el6rhs.x86_64
glusterfs-3.7.1-3.el6rhs.x86_64
glusterfs-fuse-3.7.1-3.el6rhs.x86_64
glusterfs-server-3.7.1-3.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-3.el6rhs.x86_64
glusterfs-cli-3.7.1-3.el6rhs.x86_64
[root@dhcp43-93 ~]# 

##########  CLIENT   ###################

[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# ls -lrt
total 1
-rw-r--r--. 1 root root  0 Jun 17 21:28 1
-rwxr-xr-x. 3 root root 27 Jun 17 21:33 test2_ln
-rw-r--r--. 1 root root  9 Jun 18 21:20 file1
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# ln file1 linkfile1
[root@dhcp43-71 dir1]# ls -lrt
total 2
-rw-r--r--. 1 root root  0 Jun 17 21:28 1
-rwxr-xr-x. 3 root root 27 Jun 17 21:33 test2_ln
-rw-r--r--. 2 root root  9 Jun 18 21:20 linkfile1
-rw-r--r--. 2 root root  9 Jun 18 21:20 file1
[root@dhcp43-71 dir1]# chmod 755 linkfile1 
[root@dhcp43-71 dir1]# ls -lrt
total 2
-rw-r--r--. 1 root root  0 Jun 17 21:28 1
-rwxr-xr-x. 3 root root 27 Jun 17 21:33 test2_ln
-rwxr-xr-x. 2 root root  9 Jun 18 21:20 linkfile1
-rwxr-xr-x. 2 root root  9 Jun 18 21:20 file1
[root@dhcp43-71 dir1]# mv linkfile1 ../linkfile2
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]#  df -k .
Filesystem        1K-blocks   Used Available Use% Mounted on
10.70.43.93:/vol1  33511424 143616  33367808   1% /mnt/vol1
[root@dhcp43-71 dir1]# 
[root@dhcp43-71 dir1]# pwd
/mnt/vol1/dir1
[root@dhcp43-71 dir1]#

Comment 3 Milind Changire 2015-06-26 06:41:26 UTC
In case of RENAME hard-link, glusterfind should use the base-name of the old file after constructing the dir-name from the PGFID. I think this should be done as a generic case rather than specifically for hard links.

The issue is manifest only with a MODIFY hard-link-1 operation followed by a RENAME hard-link-2 operation. A single RENAME hard-link on its own in a glusterfind session gets correctly emitted as a RENAME hard-link-2 new-hard-link-2

Comment 6 Kotresh HR 2015-07-06 10:53:39 UTC
The fix for https://bugzilla.redhat.com/show_bug.cgi?id=1228247 also fixes this

Downstream Patch:
https://code.engineering.redhat.com/gerrit/#/c/52285/

Comment 7 Sweta Anandpara 2015-07-09 13:48:57 UTC
Verified this on the build 3.7.1-8 build and do see an issue with multiple modify and rename of hardlinks.

Detailed logs are pasted below, and sosreports attached in: 
http://rhsqe-repo.lab.eng.blr.redhat.com/sosreports/1233147

SERVER
=========

[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v list
testvol
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# rpm -qa | grep gluster
glusterfs-libs-3.7.1-8.el6rhs.x86_64
glusterfs-fuse-3.7.1-8.el6rhs.x86_64
glusterfs-3.7.1-8.el6rhs.x86_64
glusterfs-api-3.7.1-8.el6rhs.x86_64
glusterfs-cli-3.7.1-8.el6rhs.x86_64
glusterfs-geo-replication-3.7.1-8.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-8.el6rhs.x86_64
glusterfs-server-3.7.1-8.el6rhs.x86_64
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v create ozone replica 2 10.70.43.140:/rhs/thinbrick1/ozone 10.70.42.75:/rhs/thinbrick1/ozone 10.70.43.140:/rhs/thinbrick2/ozone 10.70.42.75:/rhs/thinbrick2/ozone
volume create: ozone: success: please start the volume to access data
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v info ozone
 
Volume Name: ozone
Type: Distributed-Replicate
Volume ID: aa2e4386-ab12-4d17-8cf6-894e29e94563
Status: Created
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.140:/rhs/thinbrick1/ozone
Brick2: 10.70.42.75:/rhs/thinbrick1/ozone
Brick3: 10.70.43.140:/rhs/thinbrick2/ozone
Brick4: 10.70.42.75:/rhs/thinbrick2/ozone
Options Reconfigured:
performance.readdir-ahead: on
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v start ozone



volume start: ozone: success
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v info ozone
 
Volume Name: ozone
Type: Distributed-Replicate
Volume ID: aa2e4386-ab12-4d17-8cf6-894e29e94563
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.140:/rhs/thinbrick1/ozone
Brick2: 10.70.42.75:/rhs/thinbrick1/ozone
Brick3: 10.70.43.140:/rhs/thinbrick2/ozone
Brick4: 10.70.42.75:/rhs/thinbrick2/ozone
Options Reconfigured:
performance.readdir-ahead: on
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
testvol_session_53        testvol                   2015-07-07 00:00:23      
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind create so1 ozone
Session so1 created with volume ozone
[root@dhcp43-140 ~]# glusterfind create so12ozone
usage: glusterfind create [-h] [--debug] [--force] [--reset-session-time]
                          session volume
glusterfind create: error: too few arguments
[root@dhcp43-140 ~]#  
[root@dhcp43-140 ~]# glusterfind create so12 ozone
Session so12 created with volume ozone
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind delete so12 ozone
root.42.75's password: root.42.75's password: 


root.42.75's password: 
Session so12 with volume ozone deleted
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
testvol_session_53        testvol                   2015-07-07 00:00:23      
so1                       ozone                     2015-07-09 21:30:24      
[root@dhcp43-140 ~]# glusterfind create so2 ozone
Session so2 created with volume ozone
[root@dhcp43-140 ~]# glusterfind create so3 ozone
Session so3 created with volume ozone
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
so2                       ozone                     2015-07-09 21:31:31      
testvol_session_53        testvol                   2015-07-07 00:00:23      
so1                       ozone                     2015-07-09 21:30:24      
so3                       ozone                     2015-07-09 21:32:37      
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
MODIFY .trashcan%2F 
NEW test1 
NEW test2 
NEW test3 
NEW dir1 
NEW dir1%2F%2Fdir2 
NEW dir1%2Fdir2%2F%2Fdir3 
NEW dir1%2Fdir2%2Fdir3%2F%2Fdir4 
NEW d1 
NEW d1%2F%2Fd2 
NEW d1%2Fd2%2F%2Fd3 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
NEW dir1%2Fdir2%2Fdir3%2F%2Fd3a 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME dir1%2Fdir2%2Fdir3%2F%2Fd3a d3a
MODIFY d3a 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
MODIFY .trashcan%2Finternal_op%2F 
RENAME test1 dir1%2Fdir2%2F%2Ftest1
MODIFY dir1%2Fdir2%2Ftest1 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind pre so2 ozone /tmp/out2
Generated output file /tmp/out2
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME test2 dir1%2Fdir2%2Fdir3%2Fdir4%2F%2Ftest22
MODIFY dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# cat /tmp/out2 
MODIFY .trashcan%2F 
NEW dir1%2Fdir2%2F%2Ftest1 
NEW dir1%2Fdir2%2Fdir3%2Fdir4%2F%2Ftest22 
NEW test3 
NEW dir1 
NEW dir1%2F%2Fdir2 
NEW dir1%2Fdir2%2F%2Fdir3 
NEW dir1%2Fdir2%2Fdir3%2F%2Fdir4 
NEW d1 
NEW d1%2F%2Fd2 
NEW d1%2Fd2%2F%2Fd3 
NEW d3a 
MODIFY .trashcan%2Finternal_op%2F 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind post so2 ozone
Session so2 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
NEW dir1%2Fdir2%2F%2Ftest22_link 
NEW test3_ln 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so2 ozone
Pre script is not run
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME test3_ln d1%2Fd2%2Fd3%2F%2Ftest3_link2
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME dir1%2Fdir2%2F%2Ftest22_link test22_link
RENAME dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 test22_link
MODIFY dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 
MODIFY test22_link 
[root@dhcp43-140 ~]# 


CLIENT
========

[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# mount | grep testvol
10.70.43.93:testvol on /mnt/glusterfs type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# mount | grep oz
10.70.42.30:/ozone on /mnt/ozone type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
10.70.43.93:/ozone on /mnt/oz type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@dhcp43-71 ~]# umount /mnt/ozone
[root@dhcp43-71 ~]# mount -t glusterfs 10.70.43.140:/ozone /mnt/ozone
[root@dhcp43-71 ~]# cd /mnt/ozone
[root@dhcp43-71 ozone]# ls -a
.  ..  .trashcan
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "what a beautiful day" > test1
[root@dhcp43-71 ozone]# echo "hello world" > test2
[root@dhcp43-71 ozone]# touch test3
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mkdir -p dir1/dir2/dir3/dir4
[root@dhcp43-71 ozone]#
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -a
.  ..  dir1  test1  test2  test3  .trashcan
[root@dhcp43-71 ozone]# mkdir -p d1/d2/d3
[root@dhcp43-71 ozone]# touch d1/dia
[root@dhcp43-71 ozone]# rm d1/dia
rm: remove regular empty file `d1/dia'? y
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "whatever" > d1/d2/d3/d3a
[root@dhcp43-71 ozone]# mv d1/d2/d3/d3a dir1/dir2/dir3/
[root@dhcp43-71 ozone]# ls d1/d2/d3/
[root@dhcp43-71 ozone]# ls dir1/dir2/dir3/
d3a  dir4
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo 'whatever again' >> dir1/dir2/dir3/d3a 
[root@dhcp43-71 ozone]# mv dir1/dir2/dir3/d3a .
[root@dhcp43-71 ozone]# ls -a
.  ..  d1  d3a  dir1  test1  test2  test3  .trashcan
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# find
.
./.trashcan
./.trashcan/internal_op
./test1
./test2
./dir1
./dir1/dir2
./dir1/dir2/dir3
./dir1/dir2/dir3/dir4
./d1
./d1/d2
./d1/d2/d3
./d3a
./test3
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat test1
what a beautiful day
[root@dhcp43-71 ozone]# echo ".. and it is raining" >> test1 
[root@dhcp43-71 ozone]# mv test1 dir1/dir2/
[root@dhcp43-71 ozone]# mv dir1/dir2/test1 dir1/dir2/dir3/dir4/
[root@dhcp43-71 ozone]# echo ".. even more" >> dir1/dir2/dir3/dir4/test1 
[root@dhcp43-71 ozone]# mv dir1/dir2/dir3/dir4/test1 dir1/dir2/
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 1 root root 12 Jul  9 21:43 test2
-rw-r--r--. 1 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test2 test2new
[root@dhcp43-71 ozone]# mv test2new d1/d2/
[root@dhcp43-71 ozone]# cat d1/d2/test2new 
hello world
[root@dhcp43-71 ozone]# echo ".." >> d1/d2/test2new 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "here I come.. " >> d1/d2/test2new 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv d1/d2/test2new d1/d2/test22
[root@dhcp43-71 ozone]# mv d1/d2/test22 dir1/dir2/dir3/dir4/
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# l s-lrt
-bash: l: command not found
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 1 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ln dir1/dir2/dir3/dir4/test22 dir1/dir2/test22_link
[root@dhcp43-71 ozone]# ls dir1/dir2/test22_link
dir1/dir2/test22_link
[root@dhcp43-71 ozone]# ll dir1/dir2/test22_link
-rw-r--r--. 2 root root 30 Jul 10 00:26 dir1/dir2/test22_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat dir1/dir2/test22_link 
hello world
..
here I come.. 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# link test3 test3_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test3_link test3_ln
[root@dhcp43-71 ozone]# l s-lrt
-bash: l: command not found
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3_ln
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test3_ln d1/d2/d3/test3_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv d1/d2/d3/test3_link d1/d2/d3/test3_link2
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls d1/d2/d3/
test3_link2
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat dir1/dir2/
dir3/        test1        test22_link  
[root@dhcp43-71 ozone]# cat dir1/dir2/test22_link 
hello world
..
here I come.. 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "still coming" >> dir1/dir2/test22_link 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv dir1/dir2/test22_link .
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
-rw-r--r--. 2 root root 43 Jul 10 00:35 test22_link
[root@dhcp43-71 ozone]#

Comment 8 Sweta Anandpara 2015-07-10 11:46:44 UTC
The issue which was originally filed logged an incorrect entry of rename - which would be incorrect representation of the filesystem.

The present behaviour shows that the correct entry IS logged, along with an incorrect entry. 

In other words: 
instead of one RENAME, we get two RENAME entries. But the correct entry does get logged *first* everytime. Provided the second RENAME entry fails with eexist error (by whichever application that might use this api).

Will raise a new bug for the issue that is mentioned above, and move this to fixed in 3.1 everglades.

Comment 9 errata-xmlrpc 2015-07-29 05:06:04 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://rhn.redhat.com/errata/RHSA-2015-1495.html


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