Bug 1232237
Summary: | [Backup]: Directory creation followed by its subsequent movement logs a NEW entry with the old path | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Sweta Anandpara <sanandpa> | |
Component: | glusterfind | Assignee: | Milind Changire <mchangir> | |
Status: | CLOSED ERRATA | QA Contact: | Sweta Anandpara <sanandpa> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rhgs-3.1 | CC: | asrivast, avishwan, khiremat, mchangir, nsathyan, rhs-bugs, storage-qa-internal, vagarwal | |
Target Milestone: | --- | |||
Target Release: | RHGS 3.1.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-3.7.1-6 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1234282 (view as bug list) | Environment: | ||
Last Closed: | 2015-07-29 05:04:54 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: | 1202842, 1223636, 1234282 |
Description
Sweta Anandpara
2015-06-16 10:44:30 UTC
Addressed by Vijay Bellur with http://review.gluster.org/#/c/11356/ Although this patch restores Glusterfs to its earlier level, at this point, Raghavendra G has some reservations about recording directory renames at all the bricks. Please review patch comments for more info. The BUG#1235236 also fixes this. BUG#1235236 is MODIFIED. Hence moving this BUG to MODIFIED. Tested and verified this on the build 3.7.1-7 Every directory creation is recorded as a NEW entry. Rename of a direcotry with same/different name, across same/different location is recorded as a RENAME entry with the correct <old path> and <new path>. Directory creation followed by a rename is recorded as a NEW entry with the new path. Moving this to fixed in 3.1 everglades. Pasted below are the logs: SERVER ========= [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# gluster v create ozone replica 2 10.70.43.93:/rhs/thinbrick1/ozone 10.70.43.155:/rhs/thinbrick1/ozonen 10.70.43.93:/rhs/thinbrick2/ozone 10.70.43.155:/rhs/thinbrick2/ozone volume create: ozone: success: please start the volume to access data [root@dhcp43-93 ~]# gluster v start ozone volume start: ozone: success [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind list SESSION VOLUME SESSION TIME --------------------------------------------------------------------------- ss2 slave 2015-06-27 00:08:39 ss1 slave 2015-06-27 00:25:26 [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind create so1 ozone Session so1 created with volume ozone [root@dhcp43-93 ~]# glusterfind create so2 ozone Session so2 created with volume ozone [root@dhcp43-93 ~]# glusterfind list SESSION VOLUME SESSION TIME --------------------------------------------------------------------------- ss2 slave 2015-06-27 00:08:39 so2 ozone 2015-07-04 18:18:32 ss1 slave 2015-06-27 00:25:26 so1 ozone 2015-07-04 18:18:23 [root@dhcp43-93 ~]# glusterfind create so3 ozone Session so3 created with volume ozone [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# # after creating test1, test2, dir1/, dir2/, dir2/dir22/, dir2/dir22/dir23/, dir2/dir22/dir23/dir245/ and renaming dir2/dir22/dir23/dir245/ -> dir2/dir22/dir23/dir24/ [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind pre so1 ozone /tmp/out.txt Generated output file /tmp/out.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# vi /tmp/out.txt [root@dhcp43-93 ~]# cat /tmp/out.txt MODIFY .trashcan%2F NEW test1 NEW test2 NEW dir1 NEW dir2 NEW dir2%2F%2Fdir22 NEW dir2%2Fdir22%2F%2Fdir23 NEW dir2%2Fdir22%2Fdir23%2F%2Fdir24 [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# # after executing mv dir2/dir22/dir23/ dir1/ [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind post so1 ozone Session so1 with volume ozone updated [root@dhcp43-93 ~]# glusterfind pre so1 ozone /tmp/out.txt Generated output file /tmp/out.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# vi /tmp/out.txt [root@dhcp43-93 ~]# cat /tmp/out.txt RENAME dir2%2Fdir22%2F%2Fdir23 dir1%2F%2Fdir23 [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind post so1 ozone Session so1 with volume ozone updated [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind pre so2 ozone /tmp/out2.txt Generated output file /tmp/out2.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# cat /tmp/out2.txt MODIFY .trashcan%2F NEW test1 NEW test2 NEW dir1 NEW dir2 NEW dir2%2F%2Fdir22 NEW dir1%2F%2Fdir23 NEW dir1%2Fdir23%2F%2Fdir24 [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# # after creating : dir1/dir23/a, dir2/a, and mv dir1/dir23/ ./dir23_new [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind post so1 ozone Pre script is not run [root@dhcp43-93 ~]# glusterfind pre so1 ozone /tmp/out.txt Generated output file /tmp/out.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# cat /tmp/out.txt NEW dir23_new%2F%2Fa NEW dir2%2F%2Fa RENAME dir1%2F%2Fdir23 dir23_new [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# # after doing: mv dir23_new/dir24/ dir2/dir22/, touch dir2/dir22/dir24/file1, mv dir2/dir22/dir24/file1 dir23_new/file1_new [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind post so1 ozoen Session so1 not created with volume ozoen [root@dhcp43-93 ~]# glusterfind post so1 ozone Session so1 with volume ozone updated [root@dhcp43-93 ~]# glusterfind pre so1 ozone /tmp/out.txt Generated output file /tmp/out.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# cat /tmp/out.txt RENAME dir23_new%2F%2Fdir24 dir2%2Fdir22%2F%2Fdir24 NEW dir23_new%2F%2Ffile1_new [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind post so1 ozone Session so1 with volume ozone updated [root@dhcp43-93 ~]# glusterfind pre so2 ozone /tmp/out2.txt Post command is not run after last pre, use --regenerate-outfile [root@dhcp43-93 ~]# glusterfind post so2 ozone Session so2 with volume ozone updated [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# glusterfind pre so2 ozone /tmp/out2.txt Generated output file /tmp/out2.txt [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# cat /tmp/out2.txt NEW dir23_new%2F%2Fa NEW dir2%2F%2Fa RENAME dir1%2F%2Fdir23 dir23_new RENAME dir23_new%2F%2Fdir24 dir2%2Fdir22%2F%2Fdir24 NEW dir23_new%2F%2Ffile1_new [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# rpm -qa | grep glusterfs glusterfs-client-xlators-3.7.1-7.el6rhs.x86_64 glusterfs-server-3.7.1-7.el6rhs.x86_64 glusterfs-3.7.1-7.el6rhs.x86_64 glusterfs-api-3.7.1-7.el6rhs.x86_64 glusterfs-cli-3.7.1-7.el6rhs.x86_64 glusterfs-geo-replication-3.7.1-7.el6rhs.x86_64 glusterfs-libs-3.7.1-7.el6rhs.x86_64 glusterfs-fuse-3.7.1-7.el6rhs.x86_64 [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# [root@dhcp43-93 ~]# rpm -qa | grep glusterfs glusterfs-client-xlators-3.7.1-7.el6rhs.x86_64 glusterfs-server-3.7.1-7.el6rhs.x86_64 glusterfs-3.7.1-7.el6rhs.x86_64 glusterfs-api-3.7.1-7.el6rhs.x86_64 glusterfs-cli-3.7.1-7.el6rhs.x86_64 glusterfs-geo-replication-3.7.1-7.el6rhs.x86_64 glusterfs-libs-3.7.1-7.el6rhs.x86_64 glusterfs-fuse-3.7.1-7.el6rhs.x86_64 [root@dhcp43-93 ~]# gluster peer status Number of Peers: 1 Hostname: 10.70.43.155 Uuid: 97f53dc5-1ba1-45dc-acdd-ddf38229035b State: Peer in Cluster (Connected) [root@dhcp43-93 ~]# CLIENT ========= [root@dhcp43-59 ~]# mkdir /mnt/oz [root@dhcp43-59 ~]# mount -t glusterfs 10.70.43.93:/ozone /mnt/oz [root@dhcp43-59 ~]# cd /mnt/oz [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls -a . .. .trashcan [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# echo "what a beautiful day" > test1 [root@dhcp43-59 oz]# echo "hello world" > test2 [root@dhcp43-59 oz]# l s-a -bash: l: command not found [root@dhcp43-59 oz]# ls -a . .. test1 test2 .trashcan [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# mkdir dir1 [root@dhcp43-59 oz]# mkdir -p dir2/dir22/dir23/dir245 [root@dhcp43-59 oz]# mv dir2/dir22/dir23/dir245 dir2/dir22/dir23/dir24 [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# mv dir2/dir22/dir23/ dir1/ [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# cd dir1/dir23/dir24/^C [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# pwd /mnt/oz [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls dir1 dir2 test1 test2 [root@dhcp43-59 oz]# ls -lrt total 3 -rw-r--r--. 1 root root 21 Jul 4 18:23 test1 -rw-r--r--. 1 root root 12 Jul 4 18:24 test2 drwxr-xr-x. 3 root root 36 Jul 4 18:24 dir2 drwxr-xr-x. 3 root root 36 Jul 4 18:26 dir1 [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls -lrt dir1/dir23/dir24/ total 0 [root@dhcp43-59 oz]# ls -lrt dir2/dir22/ total 0 [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# touch dir1/dir23/a [root@dhcp43-59 oz]# touch dir2/a [root@dhcp43-59 oz]# mv dir1/dir23/ ./dir23_new [root@dhcp43-59 oz]# ls -a . .. dir1 dir2 dir23_new test1 test2 .trashcan [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls -lrt dir23_new/ a dir24/ [root@dhcp43-59 oz]# ls -lrt dir23_new/dir24/ total 0 [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls -la total 10 drwxr-xr-x. 7 root root 178 Jul 4 18:29 . drwxr-xr-x. 12 root root 4096 Jul 4 18:18 .. drwxr-xr-x. 2 root root 12 Jul 4 18:29 dir1 drwxr-xr-x. 3 root root 44 Jul 4 18:29 dir2 drwxr-xr-x. 3 root root 44 Jul 4 18:29 dir23_new -rw-r--r--. 1 root root 21 Jul 4 18:23 test1 -rw-r--r--. 1 root root 12 Jul 4 18:24 test2 drwxr-xr-x. 3 root root 48 Jul 4 18:17 .trashcan [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# touch dir2 dir2/ dir23_new/ [root@dhcp43-59 oz]# mv dir23_new/ a dir24/ [root@dhcp43-59 oz]# mv dir23_new/dir24/ dir2 dir2/ dir23_new/ [root@dhcp43-59 oz]# mv dir23_new/dir24/ dir2/ a dir22/ [root@dhcp43-59 oz]# mv dir23_new/dir24/ dir2/dir22/ [root@dhcp43-59 oz]# touch dir2/dir22/dir24/file1 [root@dhcp43-59 oz]# mv dir2/dir22/dir24/file1 dir23_new/file1_new [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# ls -lr dir23_new/ total 0 -rw-r--r--. 1 root root 0 Jul 4 18:33 file1_new -rw-r--r--. 1 root root 0 Jul 4 18:29 a [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# [root@dhcp43-59 oz]# rpm -qa | grep gluster glusterfs-libs-3.7.1-3.el6.x86_64 glusterfs-client-xlators-3.7.1-3.el6.x86_64 glusterfs-fuse-3.7.1-3.el6.x86_64 glusterfs-3.7.1-3.el6.x86_64 [root@dhcp43-59 oz]# 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 |